/* Concatednated YUI classes - YUI Base, Dom, Event, Animation and Connection */

/* YUI Base: http://yui.yahooapis.com/2.3.0/build/yahoo/yahoo-min.js */
if(typeof YAHOO=="undefined"){var YAHOO={};}
YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;i=i+1){d=a[i].split(".");o=YAHOO;for(j=(d[0]=="YAHOO")?1:0;j<d.length;j=j+1){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}
return o;};YAHOO.log=function(msg,cat,src){var l=YAHOO.widget.Logger;if(l&&l.log){return l.log(msg,cat,src);}else{return false;}};YAHOO.register=function(name,mainClass,data){var mods=YAHOO.env.modules;if(!mods[name]){mods[name]={versions:[],builds:[]};}
var m=mods[name],v=data.version,b=data.build,ls=YAHOO.env.listeners;m.name=name;m.version=v;m.build=b;m.versions.push(v);m.builds.push(b);m.mainClass=mainClass;for(var i=0;i<ls.length;i=i+1){ls[i](m);}
if(mainClass){mainClass.VERSION=v;mainClass.BUILD=b;}else{YAHOO.log("mainClass is undefined for module "+name,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(name){return YAHOO.env.modules[name]||null;};YAHOO.env.ua=function(){var o={ie:0,opera:0,gecko:0,webkit:0};var ua=navigator.userAgent,m;if((/KHTML/).test(ua)){o.webkit=1;}
m=ua.match(/AppleWebKit\/([^\s]*)/);if(m&&m[1]){o.webkit=parseFloat(m[1]);}
if(!o.webkit){m=ua.match(/Opera[\s\/]([^\s]*)/);if(m&&m[1]){o.opera=parseFloat(m[1]);}else{m=ua.match(/MSIE\s([^;]*)/);if(m&&m[1]){o.ie=parseFloat(m[1]);}else{m=ua.match(/Gecko\/([^\s]*)/);if(m){o.gecko=1;m=ua.match(/rv:([^\s\)]*)/);if(m&&m[1]){o.gecko=parseFloat(m[1]);}}}}}
return o;}();(function(){YAHOO.namespace("util","widget","example");if(typeof YAHOO_config!="undefined"){var l=YAHOO_config.listener,ls=YAHOO.env.listeners,unique=true,i;if(l){for(i=0;i<ls.length;i=i+1){if(ls[i]==l){unique=false;break;}}
if(unique){ls.push(l);}}}})();YAHOO.lang={isArray:function(o){if(o){var l=YAHOO.lang;return l.isNumber(o.length)&&l.isFunction(o.splice)&&!l.hasOwnProperty(o.length);}
return false;},isBoolean:function(o){return typeof o==='boolean';},isFunction:function(o){return typeof o==='function';},isNull:function(o){return o===null;},isNumber:function(o){return typeof o==='number'&&isFinite(o);},isObject:function(o){return(o&&(typeof o==='object'||YAHOO.lang.isFunction(o)))||false;},isString:function(o){return typeof o==='string';},isUndefined:function(o){return typeof o==='undefined';},hasOwnProperty:function(o,prop){if(Object.prototype.hasOwnProperty){return o.hasOwnProperty(prop);}
return!YAHOO.lang.isUndefined(o[prop])&&o.constructor.prototype[prop]!==o[prop];},_IEEnumFix:function(r,s){if(YAHOO.env.ua.ie){var add=["toString","valueOf"];for(i=0;i<add.length;i=i+1){var fname=add[i],f=s[fname];if(YAHOO.lang.isFunction(f)&&f!=Object.prototype[fname]){r[fname]=f;}}}},extend:function(subc,superc,overrides){if(!superc||!subc){throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");}
var F=function(){};F.prototype=superc.prototype;subc.prototype=new F();subc.prototype.constructor=subc;subc.superclass=superc.prototype;if(superc.prototype.constructor==Object.prototype.constructor){superc.prototype.constructor=superc;}
if(overrides){for(var i in overrides){subc.prototype[i]=overrides[i];}
YAHOO.lang._IEEnumFix(subc.prototype,overrides);}},augmentObject:function(r,s){if(!s||!r){throw new Error("Absorb failed, verify dependencies.");}
var a=arguments,i,p,override=a[2];if(override&&override!==true){for(i=2;i<a.length;i=i+1){r[a[i]]=s[a[i]];}}else{for(p in s){if(override||!r[p]){r[p]=s[p];}}
YAHOO.lang._IEEnumFix(r,s);}},augmentProto:function(r,s){if(!s||!r){throw new Error("Augment failed, verify dependencies.");}
var a=[r.prototype,s.prototype];for(var i=2;i<arguments.length;i=i+1){a.push(arguments[i]);}
YAHOO.lang.augmentObject.apply(this,a);},dump:function(o,d){var l=YAHOO.lang,i,len,s=[],OBJ="{...}",FUN="f(){...}",COMMA=', ',ARROW=' => ';if(!l.isObject(o)||o instanceof Date||("nodeType"in o&&"tagName"in o)){return o;}else if(l.isFunction(o)){return FUN;}
d=(l.isNumber(d))?d:3;if(l.isArray(o)){s.push("[");for(i=0,len=o.length;i<len;i=i+1){if(l.isObject(o[i])){s.push((d>0)?l.dump(o[i],d-1):OBJ);}else{s.push(o[i]);}
s.push(COMMA);}
if(s.length>1){s.pop();}
s.push("]");}else{s.push("{");for(i in o){if(l.hasOwnProperty(o,i)){s.push(i+ARROW);if(l.isObject(o[i])){s.push((d>0)?l.dump(o[i],d-1):OBJ);}else{s.push(o[i]);}
s.push(COMMA);}}
if(s.length>1){s.pop();}
s.push("}");}
return s.join("");},substitute:function(s,o,f){var i,j,k,key,v,meta,l=YAHOO.lang,saved=[],token,DUMP='dump',SPACE=' ',LBRACE='{',RBRACE='}';for(;;){i=s.lastIndexOf(LBRACE);if(i<0){break;}
j=s.indexOf(RBRACE,i);if(i+1>=j){break;}
token=s.substring(i+1,j);key=token;meta=null;k=key.indexOf(SPACE);if(k>-1){meta=key.substring(k+1);key=key.substring(0,k);}
v=o[key];if(f){v=f(key,v,meta);}
if(l.isObject(v)){if(l.isArray(v)){v=l.dump(v,parseInt(meta,10));}else{meta=meta||"";var dump=meta.indexOf(DUMP);if(dump>-1){meta=meta.substring(4);}
if(v.toString===Object.prototype.toString||dump>-1){v=l.dump(v,parseInt(meta,10));}else{v=v.toString();}}}else if(!l.isString(v)&&!l.isNumber(v)){v="~-"+saved.length+"-~";saved[saved.length]=token;}
s=s.substring(0,i)+v+s.substring(j+1);}
for(i=saved.length-1;i>=0;i=i-1){s=s.replace(new RegExp("~-"+i+"-~"),"{"+saved[i]+"}","g");}
return s;},trim:function(s){try{return s.replace(/^\s+|\s+$/g,"");}catch(e){return s;}},merge:function(){var o={},a=arguments,i;for(i=0;i<a.length;i=i+1){YAHOO.lang.augmentObject(o,a[i],true);}
return o;},isValue:function(o){var l=YAHOO.lang;return(l.isObject(o)||l.isString(o)||l.isNumber(o)||l.isBoolean(o));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.3.0",build:"442"});

/* Dom: http://yui.yahooapis.com/2.3.0/build/dom/dom-min.js */
(function(){var Y=YAHOO.util,getStyle,setStyle,id_counter=0,propertyCache={},reClassNameCache={};var isOpera=YAHOO.env.ua.opera,isSafari=YAHOO.env.ua.webkit,isGecko=YAHOO.env.ua.gecko,isIE=YAHOO.env.ua.ie;var patterns={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;}
if(propertyCache[property]){return propertyCache[property];}
var converted=property;while(patterns.HYPHEN.exec(converted)){converted=converted.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}
propertyCache[property]=converted;return converted;};var getClassRegEx=function(className){var re=reClassNameCache[className];if(!re){re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');reClassNameCache[className]=re;}
return re;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;if(property=='float'){property='cssFloat';}
var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[toCamel(property)];}
return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case'opacity':var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){try{val=el.filters('alpha').opacity;}catch(e){}}
return val/100;case'float':property='styleFloat';default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};}
if(isIE){setStyle=function(el,property,val){switch(property){case'opacity':if(YAHOO.lang.isString(el.style.filter)){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}
break;case'float':property='styleFloat';default:el.style[property]=val;}};}else{setStyle=function(el,property,val){if(property=='float'){property='cssFloat';}
el.style[property]=val;};}
var testElement=function(node,method){return node&&node.nodeType==1&&(!method||method(node));};YAHOO.util.Dom={get:function(el){if(!el||el.tagName||el.item){return el;}
if(YAHOO.lang.isString(el)){return document.getElementById(el);}
if(el.splice){var c=[];for(var i=0,len=el.length;i<len;++i){c[c.length]=Y.Dom.get(el[i]);}
return c;}
return el;},getStyle:function(el,property){property=toCamel(property);var f=function(element){return getStyle(element,property);};return Y.Dom.batch(el,f,Y.Dom,true);},setStyle:function(el,property,val){property=toCamel(property);var f=function(element){setStyle(element,property,val);};Y.Dom.batch(el,f,Y.Dom,true);},getXY:function(el){var f=function(el){if((el.parentNode===null||el.offsetParent===null||this.getStyle(el,'display')=='none')&&el!=document.body){return false;}
var parentNode=null;var pos=[];var box;var doc=el.ownerDocument;if(el.getBoundingClientRect){box=el.getBoundingClientRect();return[box.left+Y.Dom.getDocumentScrollLeft(el.ownerDocument),box.top+Y.Dom.getDocumentScrollTop(el.ownerDocument)];}
else{pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;var hasAbs=this.getStyle(el,'position')=='absolute';if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;if(isSafari&&!hasAbs&&this.getStyle(parentNode,'position')=='absolute'){hasAbs=true;}
parentNode=parentNode.offsetParent;}}
if(isSafari&&hasAbs){pos[0]-=el.ownerDocument.body.offsetLeft;pos[1]-=el.ownerDocument.body.offsetTop;}}
parentNode=el.parentNode;while(parentNode.tagName&&!patterns.ROOT_TAG.test(parentNode.tagName))
{if(Y.Dom.getStyle(parentNode,'display').search(/^inline|table-row.*$/i)){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}
parentNode=parentNode.parentNode;}
return pos;};return Y.Dom.batch(el,f,Y.Dom,true);},getX:function(el){var f=function(el){return Y.Dom.getXY(el)[0];};return Y.Dom.batch(el,f,Y.Dom,true);},getY:function(el){var f=function(el){return Y.Dom.getXY(el)[1];};return Y.Dom.batch(el,f,Y.Dom,true);},setXY:function(el,pos,noRetry){var f=function(el){var style_pos=this.getStyle(el,'position');if(style_pos=='static'){this.setStyle(el,'position','relative');style_pos='relative';}
var pageXY=this.getXY(el);if(pageXY===false){return false;}
var delta=[parseInt(this.getStyle(el,'left'),10),parseInt(this.getStyle(el,'top'),10)];if(isNaN(delta[0])){delta[0]=(style_pos=='relative')?0:el.offsetLeft;}
if(isNaN(delta[1])){delta[1]=(style_pos=='relative')?0:el.offsetTop;}
if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+'px';}
if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+'px';}
if(!noRetry){var newXY=this.getXY(el);if((pos[0]!==null&&newXY[0]!=pos[0])||(pos[1]!==null&&newXY[1]!=pos[1])){this.setXY(el,pos,true);}}};Y.Dom.batch(el,f,Y.Dom,true);},setX:function(el,x){Y.Dom.setXY(el,[x,null]);},setY:function(el,y){Y.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){if((el.parentNode===null||el.offsetParent===null||this.getStyle(el,'display')=='none')&&el!=document.body){return false;}
var region=Y.Region.getRegion(el);return region;};return Y.Dom.batch(el,f,Y.Dom,true);},getClientWidth:function(){return Y.Dom.getViewportWidth();},getClientHeight:function(){return Y.Dom.getViewportHeight();},getElementsByClassName:function(className,tag,root,apply){tag=tag||'*';root=(root)?Y.Dom.get(root):null||document;if(!root){return[];}
var nodes=[],elements=root.getElementsByTagName(tag),re=getClassRegEx(className);for(var i=0,len=elements.length;i<len;++i){if(re.test(elements[i].className)){nodes[nodes.length]=elements[i];if(apply){apply.call(elements[i],elements[i]);}}}
return nodes;},hasClass:function(el,className){var re=getClassRegEx(className);var f=function(el){return re.test(el.className);};return Y.Dom.batch(el,f,Y.Dom,true);},addClass:function(el,className){var f=function(el){if(this.hasClass(el,className)){return false;}
el.className=YAHOO.lang.trim([el.className,className].join(' '));return true;};return Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,className){var re=getClassRegEx(className);var f=function(el){if(!this.hasClass(el,className)){return false;}
var c=el.className;el.className=c.replace(re,' ');if(this.hasClass(el,className)){this.removeClass(el,className);}
el.className=YAHOO.lang.trim(el.className);return true;};return Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(!newClassName||oldClassName===newClassName){return false;}
var re=getClassRegEx(oldClassName);var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return true;}
el.className=el.className.replace(re,' '+newClassName+' ');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}
el.className=YAHOO.lang.trim(el.className);return true;};return Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,prefix){prefix=prefix||'yui-gen';var f=function(el){if(el&&el.id){return el.id;}
var id=prefix+id_counter++;if(el){el.id=id;}
return id;};return Y.Dom.batch(el,f,Y.Dom,true)||f.apply(Y.Dom,arguments);},isAncestor:function(haystack,needle){haystack=Y.Dom.get(haystack);if(!haystack||!needle){return false;}
var f=function(node){if(haystack.contains&&node.nodeType&&!isSafari){return haystack.contains(node);}
else if(haystack.compareDocumentPosition&&node.nodeType){return!!(haystack.compareDocumentPosition(node)&16);}else if(node.nodeType){return!!this.getAncestorBy(node,function(el){return el==haystack;});}
return false;};return Y.Dom.batch(needle,f,Y.Dom,true);},inDocument:function(el){var f=function(el){if(isSafari){while(el=el.parentNode){if(el==document.documentElement){return true;}}
return false;}
return this.isAncestor(document.documentElement,el);};return Y.Dom.batch(el,f,Y.Dom,true);},getElementsBy:function(method,tag,root,apply){tag=tag||'*';root=(root)?Y.Dom.get(root):null||document;if(!root){return[];}
var nodes=[],elements=root.getElementsByTagName(tag);for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];if(apply){apply(elements[i]);}}}
return nodes;},batch:function(el,method,o,override){el=(el&&el.tagName)?el:Y.Dom.get(el);if(!el||!method){return false;}
var scope=(override)?o:window;if(el.tagName||(!el.item&&!el.slice)){return method.call(scope,el,o);}
var collection=[];for(var i=0,len=el.length;i<len;++i){collection[collection.length]=method.call(scope,el[i],o);}
return collection;},getDocumentHeight:function(){var scrollHeight=(document.compatMode!='CSS1Compat')?document.body.scrollHeight:document.documentElement.scrollHeight;var h=Math.max(scrollHeight,Y.Dom.getViewportHeight());return h;},getDocumentWidth:function(){var scrollWidth=(document.compatMode!='CSS1Compat')?document.body.scrollWidth:document.documentElement.scrollWidth;var w=Math.max(scrollWidth,Y.Dom.getViewportWidth());return w;},getViewportHeight:function(){var height=self.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=(mode=='CSS1Compat')?document.documentElement.clientHeight:document.body.clientHeight;}
return height;},getViewportWidth:function(){var width=self.innerWidth;var mode=document.compatMode;if(mode||isIE){width=(mode=='CSS1Compat')?document.documentElement.clientWidth:document.body.clientWidth;}
return width;},getAncestorBy:function(node,method){while(node=node.parentNode){if(testElement(node,method)){return node;}}
return null;},getAncestorByClassName:function(node,className){node=Y.Dom.get(node);if(!node){return null;}
var method=function(el){return Y.Dom.hasClass(el,className);};return Y.Dom.getAncestorBy(node,method);},getAncestorByTagName:function(node,tagName){node=Y.Dom.get(node);if(!node){return null;}
var method=function(el){return el.tagName&&el.tagName.toUpperCase()==tagName.toUpperCase();};return Y.Dom.getAncestorBy(node,method);},getPreviousSiblingBy:function(node,method){while(node){node=node.previousSibling;if(testElement(node,method)){return node;}}
return null;},getPreviousSibling:function(node){node=Y.Dom.get(node);if(!node){return null;}
return Y.Dom.getPreviousSiblingBy(node);},getNextSiblingBy:function(node,method){while(node){node=node.nextSibling;if(testElement(node,method)){return node;}}
return null;},getNextSibling:function(node){node=Y.Dom.get(node);if(!node){return null;}
return Y.Dom.getNextSiblingBy(node);},getFirstChildBy:function(node,method){var child=(testElement(node.firstChild,method))?node.firstChild:null;return child||Y.Dom.getNextSiblingBy(node.firstChild,method);},getFirstChild:function(node,method){node=Y.Dom.get(node);if(!node){return null;}
return Y.Dom.getFirstChildBy(node);},getLastChildBy:function(node,method){if(!node){return null;}
var child=(testElement(node.lastChild,method))?node.lastChild:null;return child||Y.Dom.getPreviousSiblingBy(node.lastChild,method);},getLastChild:function(node){node=Y.Dom.get(node);return Y.Dom.getLastChildBy(node);},getChildrenBy:function(node,method){var child=Y.Dom.getFirstChildBy(node,method);var children=child?[child]:[];Y.Dom.getNextSiblingBy(child,function(node){if(!method||method(node)){children[children.length]=node;}
return false;});return children;},getChildren:function(node){node=Y.Dom.get(node);if(!node){}
return Y.Dom.getChildrenBy(node);},getDocumentScrollLeft:function(doc){doc=doc||document;return Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);},getDocumentScrollTop:function(doc){doc=doc||document;return Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);},insertBefore:function(newNode,referenceNode){newNode=Y.Dom.get(newNode);referenceNode=Y.Dom.get(referenceNode);if(!newNode||!referenceNode||!referenceNode.parentNode){return null;}
return referenceNode.parentNode.insertBefore(newNode,referenceNode);},insertAfter:function(newNode,referenceNode){newNode=Y.Dom.get(newNode);referenceNode=Y.Dom.get(referenceNode);if(!newNode||!referenceNode||!referenceNode.parentNode){return null;}
if(referenceNode.nextSibling){return referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling);}else{return referenceNode.parentNode.appendChild(newNode);}}};})();YAHOO.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};YAHOO.util.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(YAHOO.lang.isArray(x)){y=x[1];x=x[0];}
this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.3.0",build:"442"});

/* Event: http://yui.yahooapis.com/2.3.0/build/event/event-min.js */
YAHOO.util.CustomEvent=function(type,oScope,silent,signature){this.type=type;this.scope=oScope||window;this.silent=silent;this.signature=signature||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}
var onsubscribeType="_YUICEOnSubscribe";if(type!==onsubscribeType){this.subscribeEvent=new YAHOO.util.CustomEvent(onsubscribeType,this,true);}};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(fn,obj,override){if(!fn){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}
if(this.subscribeEvent){this.subscribeEvent.fire(fn,obj,override);}
this.subscribers.push(new YAHOO.util.Subscriber(fn,obj,override));},unsubscribe:function(fn,obj){if(!fn){return this.unsubscribeAll();}
var found=false;for(var i=0,len=this.subscribers.length;i<len;++i){var s=this.subscribers[i];if(s&&s.contains(fn,obj)){this._delete(i);found=true;}}
return found;},fire:function(){var len=this.subscribers.length;if(!len&&this.silent){return true;}
var args=[],ret=true,i,rebuild=false;for(i=0;i<arguments.length;++i){args.push(arguments[i]);}
var argslength=args.length;if(!this.silent){}
for(i=0;i<len;++i){var s=this.subscribers[i];if(!s){rebuild=true;}else{if(!this.silent){}
var scope=s.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var param=null;if(args.length>0){param=args[0];}
ret=s.fn.call(scope,param,s.obj);}else{ret=s.fn.call(scope,this.type,args,s.obj);}
if(false===ret){if(!this.silent){}
return false;}}}
if(rebuild){var newlist=[],subs=this.subscribers;for(i=0,len=subs.length;i<len;++i){s=subs[i];newlist.push(subs[i]);}
this.subscribers=newlist;}
return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._delete(len-1-i);}
this.subscribers=[];return i;},_delete:function(index){var s=this.subscribers[index];if(s){delete s.fn;delete s.obj;}
this.subscribers[index]=null;},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(fn,obj,override){this.fn=fn;this.obj=YAHOO.lang.isUndefined(obj)?null:obj;this.override=override;};YAHOO.util.Subscriber.prototype.getScope=function(defaultScope){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}
return defaultScope;};YAHOO.util.Subscriber.prototype.contains=function(fn,obj){if(obj){return(this.fn==fn&&this.obj==obj);}else{return(this.fn==fn);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var loadComplete=false;var DOMReady=false;var listeners=[];var unloadListeners=[];var legacyEvents=[];var legacyHandlers=[];var retryCount=0;var onAvailStack=[];var legacyMap=[];var counter=0;var webkitKeymap={63232:38,63233:40,63234:37,63235:39};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,startInterval:function(){if(!this._interval){var self=this;var callback=function(){self._tryPreloadAttach();};this._interval=setInterval(callback,this.POLL_INTERVAL);}},onAvailable:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:false});retryCount=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(p_fn,p_obj,p_override){if(DOMReady){setTimeout(function(){var s=window;if(p_override){if(p_override===true){s=p_obj;}else{s=p_override;}}
p_fn.call(s,"DOMReady",[],p_obj);},0);}else{this.DOMReadyEvent.subscribe(p_fn,p_obj,p_override);}},onContentReady:function(p_id,p_fn,p_obj,p_override){onAvailStack.push({id:p_id,fn:p_fn,obj:p_obj,override:p_override,checkReady:true});retryCount=this.POLL_RETRYS;this.startInterval();},addListener:function(el,sType,fn,obj,override){if(!fn||!fn.call){return false;}
if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=this.on(el[i],sType,fn,obj,override)&&ok;}
return ok;}else if(YAHOO.lang.isString(el)){var oEl=this.getEl(el);if(oEl){el=oEl;}else{this.onAvailable(el,function(){YAHOO.util.Event.on(el,sType,fn,obj,override);});return true;}}
if(!el){return false;}
if("unload"==sType&&obj!==this){unloadListeners[unloadListeners.length]=[el,sType,fn,obj,override];return true;}
var scope=el;if(override){if(override===true){scope=obj;}else{scope=override;}}
var wrappedFn=function(e){return fn.call(scope,YAHOO.util.Event.getEvent(e),obj);};var li=[el,sType,fn,wrappedFn,scope];var index=listeners.length;listeners[index]=li;if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);if(legacyIndex==-1||el!=legacyEvents[legacyIndex][0]){legacyIndex=legacyEvents.length;legacyMap[el.id+sType]=legacyIndex;legacyEvents[legacyIndex]=[el,sType,el["on"+sType]];legacyHandlers[legacyIndex]=[];el["on"+sType]=function(e){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(e),legacyIndex);};}
legacyHandlers[legacyIndex].push(li);}else{try{this._simpleAdd(el,sType,wrappedFn,false);}catch(ex){this.lastError=ex;this.removeListener(el,sType,fn);return false;}}
return true;},fireLegacyEvent:function(e,legacyIndex){var ok=true,le,lh,li,scope,ret;lh=legacyHandlers[legacyIndex];for(var i=0,len=lh.length;i<len;++i){li=lh[i];if(li&&li[this.WFN]){scope=li[this.ADJ_SCOPE];ret=li[this.WFN].call(scope,e);ok=(ok&&ret);}}
le=legacyEvents[legacyIndex];if(le&&le[2]){le[2](e);}
return ok;},getLegacyIndex:function(el,sType){var key=this.generateId(el)+sType;if(typeof legacyMap[key]=="undefined"){return-1;}else{return legacyMap[key];}},useLegacyEvent:function(el,sType){if(this.webkit&&("click"==sType||"dblclick"==sType)){var v=parseInt(this.webkit,10);if(!isNaN(v)&&v<418){return true;}}
return false;},removeListener:function(el,sType,fn){var i,len;if(typeof el=="string"){el=this.getEl(el);}else if(this._isValidCollection(el)){var ok=true;for(i=0,len=el.length;i<len;++i){ok=(this.removeListener(el[i],sType,fn)&&ok);}
return ok;}
if(!fn||!fn.call){return this.purgeElement(el,false,sType);}
if("unload"==sType){for(i=0,len=unloadListeners.length;i<len;i++){var li=unloadListeners[i];if(li&&li[0]==el&&li[1]==sType&&li[2]==fn){unloadListeners[i]=null;return true;}}
return false;}
var cacheItem=null;var index=arguments[3];if("undefined"==typeof index){index=this._getCacheIndex(el,sType,fn);}
if(index>=0){cacheItem=listeners[index];}
if(!el||!cacheItem){return false;}
if(this.useLegacyEvent(el,sType)){var legacyIndex=this.getLegacyIndex(el,sType);var llist=legacyHandlers[legacyIndex];if(llist){for(i=0,len=llist.length;i<len;++i){li=llist[i];if(li&&li[this.EL]==el&&li[this.TYPE]==sType&&li[this.FN]==fn){llist[i]=null;break;}}}}else{try{this._simpleRemove(el,sType,cacheItem[this.WFN],false);}catch(ex){this.lastError=ex;return false;}}
delete listeners[index][this.WFN];delete listeners[index][this.FN];listeners[index]=null;return true;},getTarget:function(ev,resolveTextNode){var t=ev.target||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(node){if(node&&3==node.nodeType){return node.parentNode;}else{return node;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}
return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}
return y;},getXY:function(ev){return[this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else if(ev.type=="mouseover"){t=ev.fromElement;}}
return this.resolveTextNode(t);},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(ex){this.lastError=ex;return t;}}
return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}
c=c.caller;}}
return ev;},getCharCode:function(ev){var code=ev.keyCode||ev.charCode||0;if(YAHOO.env.ua.webkit&&(code in webkitKeymap)){code=webkitKeymap[code];}
return code;},_getCacheIndex:function(el,sType,fn){for(var i=0,len=listeners.length;i<len;++i){var li=listeners[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==sType){return i;}}
return-1;},generateId:function(el){var id=el.id;if(!id){id="yuievtautoid-"+counter;++counter;el.id=id;}
return id;},_isValidCollection:function(o){try{return(o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");}catch(e){return false;}},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(e){if(!loadComplete){loadComplete=true;var EU=YAHOO.util.Event;EU._ready();EU._tryPreloadAttach();}},_ready:function(e){if(!DOMReady){DOMReady=true;var EU=YAHOO.util.Event;EU.DOMReadyEvent.fire();EU._simpleRemove(document,"DOMContentLoaded",EU._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}
if(this.isIE){if(!DOMReady){this.startInterval();return false;}}
this.locked=true;var tryAgain=!loadComplete;if(!tryAgain){tryAgain=(retryCount>0);}
var notAvail=[];var executeItem=function(el,item){var scope=el;if(item.override){if(item.override===true){scope=item.obj;}else{scope=item.override;}}
item.fn.call(scope,item.obj);};var i,len,item,el;for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&!item.checkReady){el=this.getEl(item.id);if(el){executeItem(el,item);onAvailStack[i]=null;}else{notAvail.push(item);}}}
for(i=0,len=onAvailStack.length;i<len;++i){item=onAvailStack[i];if(item&&item.checkReady){el=this.getEl(item.id);if(el){if(loadComplete||el.nextSibling){executeItem(el,item);onAvailStack[i]=null;}}else{notAvail.push(item);}}}
retryCount=(notAvail.length===0)?0:retryCount-1;if(tryAgain){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}
this.locked=false;return true;},purgeElement:function(el,recurse,sType){var elListeners=this.getListeners(el,sType);if(elListeners){for(var i=0,len=elListeners.length;i<len;++i){var l=elListeners[i];this.removeListener(el,l.type,l.fn,l.index);}}
if(recurse&&el&&el.childNodes){for(i=0,len=el.childNodes.length;i<len;++i){this.purgeElement(el.childNodes[i],recurse,sType);}}},getListeners:function(el,sType){var results=[],searchLists;if(!sType){searchLists=[listeners,unloadListeners];}else if(sType=="unload"){searchLists=[unloadListeners];}else{searchLists=[listeners];}
for(var j=0;j<searchLists.length;++j){var searchList=searchLists[j];if(searchList&&searchList.length>0){for(var i=0,len=searchList.length;i<len;++i){var l=searchList[i];if(l&&l[this.EL]===el&&(!sType||sType===l[this.TYPE])){results.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.ADJ_SCOPE],index:i});}}}}
return(results.length)?results:null;},_unload:function(e){var EU=YAHOO.util.Event,i,j,l,len,index;for(i=0,len=unloadListeners.length;i<len;++i){l=unloadListeners[i];if(l){var scope=window;if(l[EU.ADJ_SCOPE]){if(l[EU.ADJ_SCOPE]===true){scope=l[EU.OBJ];}else{scope=l[EU.ADJ_SCOPE];}}
l[EU.FN].call(scope,EU.getEvent(e),l[EU.OBJ]);unloadListeners[i]=null;l=null;scope=null;}}
unloadListeners=null;if(listeners&&listeners.length>0){j=listeners.length;while(j){index=j-1;l=listeners[index];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],index);}
j=j-1;}
l=null;EU.clearCache();}
for(i=0,len=legacyEvents.length;i<len;++i){legacyEvents[i][0]=null;legacyEvents[i]=null;}
legacyEvents=null;EU._simpleRemove(window,"unload",EU._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return[dd.scrollTop,dd.scrollLeft];}else if(db){return[db.scrollTop,db.scrollLeft];}else{return[0,0];}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(el,sType,fn,capture){el.addEventListener(sType,fn,(capture));};}else if(window.attachEvent){return function(el,sType,fn,capture){el.attachEvent("on"+sType,fn);};}else{return function(){};}}(),_simpleRemove:function(){if(window.removeEventListener){return function(el,sType,fn,capture){el.removeEventListener(sType,fn,(capture));};}else if(window.detachEvent){return function(el,sType,fn){el.detachEvent("on"+sType,fn);};}else{return function(){};}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var el,d=document,b=d.body;if(("undefined"!==typeof YAHOO_config)&&YAHOO_config.injecting){el=document.createElement("script");var p=d.getElementsByTagName("head")[0]||b;p.insertBefore(el,p.firstChild);}else{d.write('<scr'+'ipt id="_yui_eu_dr" defer="true" src="//:"><'+'/script>');el=document.getElementById("_yui_eu_dr");}
if(el){el.onreadystatechange=function(){if("complete"===this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};}else{}
el=null;}else if(EU.webkit){EU._drwatch=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._drwatch);EU._drwatch=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(p_type,p_fn,p_obj,p_override){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(ce){ce.subscribe(p_fn,p_obj,p_override);}else{this.__yui_subscribers=this.__yui_subscribers||{};var subs=this.__yui_subscribers;if(!subs[p_type]){subs[p_type]=[];}
subs[p_type].push({fn:p_fn,obj:p_obj,override:p_override});}},unsubscribe:function(p_type,p_fn,p_obj){this.__yui_events=this.__yui_events||{};var evts=this.__yui_events;if(p_type){var ce=evts[p_type];if(ce){return ce.unsubscribe(p_fn,p_obj);}}else{for(var i in evts){var ret=true;if(YAHOO.lang.hasOwnProperty(evts,i)){ret=ret&&evts[i].unsubscribe(p_fn,p_obj);}}
return ret;}
return false;},unsubscribeAll:function(p_type){return this.unsubscribe(p_type);},createEvent:function(p_type,p_config){this.__yui_events=this.__yui_events||{};var opts=p_config||{};var events=this.__yui_events;if(events[p_type]){}else{var scope=opts.scope||this;var silent=(opts.silent);var ce=new YAHOO.util.CustomEvent(p_type,scope,silent,YAHOO.util.CustomEvent.FLAT);events[p_type]=ce;if(opts.onSubscribeCallback){ce.subscribeEvent.subscribe(opts.onSubscribeCallback);}
this.__yui_subscribers=this.__yui_subscribers||{};var qs=this.__yui_subscribers[p_type];if(qs){for(var i=0;i<qs.length;++i){ce.subscribe(qs[i].fn,qs[i].obj,qs[i].override);}}}
return events[p_type];},fireEvent:function(p_type,arg1,arg2,etc){this.__yui_events=this.__yui_events||{};var ce=this.__yui_events[p_type];if(!ce){return null;}
var args=[];for(var i=1;i<arguments.length;++i){args.push(arguments[i]);}
return ce.fire.apply(ce,args);},hasEvent:function(type){if(this.__yui_events){if(this.__yui_events[type]){return true;}}
return false;}};YAHOO.util.KeyListener=function(attachTo,keyData,handler,event){if(!attachTo){}else if(!keyData){}else if(!handler){}
if(!event){event=YAHOO.util.KeyListener.KEYDOWN;}
var keyEvent=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof attachTo=='string'){attachTo=document.getElementById(attachTo);}
if(typeof handler=='function'){keyEvent.subscribe(handler);}else{keyEvent.subscribe(handler.fn,handler.scope,handler.correctScope);}
function handleKeyPress(e,obj){if(!keyData.shift){keyData.shift=false;}
if(!keyData.alt){keyData.alt=false;}
if(!keyData.ctrl){keyData.ctrl=false;}
if(e.shiftKey==keyData.shift&&e.altKey==keyData.alt&&e.ctrlKey==keyData.ctrl){var dataItem;var keyPressed;if(keyData.keys instanceof Array){for(var i=0;i<keyData.keys.length;i++){dataItem=keyData.keys[i];if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);break;}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);break;}}}else{dataItem=keyData.keys;if(dataItem==e.charCode){keyEvent.fire(e.charCode,e);}else if(dataItem==e.keyCode){keyEvent.fire(e.keyCode,e);}}}}
this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(attachTo,event,handleKeyPress);this.enabledEvent.fire(keyData);}
this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(attachTo,event,handleKeyPress);this.disabledEvent.fire(keyData);}
this.enabled=false;};this.toString=function(){return"KeyListener ["+keyData.keys+"] "+attachTo.tagName+
(attachTo.id?"["+attachTo.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.util.Event,{version:"2.3.0",build:"442"});

/* Animation: http://yui.yahooapis.com/2.3.0/build/animation/animation-min.js */
YAHOO.util.Anim=function(el,attributes,duration,method){if(!el){}
this.init(el,attributes,duration,method);};YAHOO.util.Anim.prototype={toString:function(){var el=this.getEl();var id=el.id||el.tagName||el;return("Anim "+id);},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(attr,start,end){return this.method(this.currentFrame,start,end-start,this.totalFrames);},setAttribute:function(attr,val,unit){if(this.patterns.noNegatives.test(attr)){val=(val>0)?val:0;}
YAHOO.util.Dom.setStyle(this.getEl(),attr,val+unit);},getAttribute:function(attr){var el=this.getEl();var val=YAHOO.util.Dom.getStyle(el,attr);if(val!=='auto'&&!this.patterns.offsetUnit.test(val)){return parseFloat(val);}
var a=this.patterns.offsetAttribute.exec(attr)||[];var pos=!!(a[3]);var box=!!(a[2]);if(box||(YAHOO.util.Dom.getStyle(el,'position')=='absolute'&&pos)){val=el['offset'+a[0].charAt(0).toUpperCase()+a[0].substr(1)];}else{val=0;}
return val;},getDefaultUnit:function(attr){if(this.patterns.defaultUnit.test(attr)){return'px';}
return'';},setRuntimeAttribute:function(attr){var start;var end;var attributes=this.attributes;this.runtimeAttributes[attr]={};var isset=function(prop){return(typeof prop!=='undefined');};if(!isset(attributes[attr]['to'])&&!isset(attributes[attr]['by'])){return false;}
start=(isset(attributes[attr]['from']))?attributes[attr]['from']:this.getAttribute(attr);if(isset(attributes[attr]['to'])){end=attributes[attr]['to'];}else if(isset(attributes[attr]['by'])){if(start.constructor==Array){end=[];for(var i=0,len=start.length;i<len;++i){end[i]=start[i]+attributes[attr]['by'][i]*1;}}else{end=start+attributes[attr]['by']*1;}}
this.runtimeAttributes[attr].start=start;this.runtimeAttributes[attr].end=end;this.runtimeAttributes[attr].unit=(isset(attributes[attr].unit))?attributes[attr]['unit']:this.getDefaultUnit(attr);return true;},init:function(el,attributes,duration,method){var isAnimated=false;var startTime=null;var actualFrames=0;el=YAHOO.util.Dom.get(el);this.attributes=attributes||{};this.duration=!YAHOO.lang.isUndefined(duration)?duration:1;this.method=method||YAHOO.util.Easing.easeNone;this.useSeconds=true;this.currentFrame=0;this.totalFrames=YAHOO.util.AnimMgr.fps;this.setEl=function(element){el=YAHOO.util.Dom.get(element);};this.getEl=function(){return el;};this.isAnimated=function(){return isAnimated;};this.getStartTime=function(){return startTime;};this.runtimeAttributes={};this.animate=function(){if(this.isAnimated()){return false;}
this.currentFrame=0;this.totalFrames=(this.useSeconds)?Math.ceil(YAHOO.util.AnimMgr.fps*this.duration):this.duration;if(this.duration===0&&this.useSeconds){this.totalFrames=1;}
YAHOO.util.AnimMgr.registerElement(this);return true;};this.stop=function(finish){if(finish){this.currentFrame=this.totalFrames;this._onTween.fire();}
YAHOO.util.AnimMgr.stop(this);};var onStart=function(){this.onStart.fire();this.runtimeAttributes={};for(var attr in this.attributes){this.setRuntimeAttribute(attr);}
isAnimated=true;actualFrames=0;startTime=new Date();};var onTween=function(){var data={duration:new Date()-this.getStartTime(),currentFrame:this.currentFrame};data.toString=function(){return('duration: '+data.duration+', currentFrame: '+data.currentFrame);};this.onTween.fire(data);var runtimeAttributes=this.runtimeAttributes;for(var attr in runtimeAttributes){this.setAttribute(attr,this.doMethod(attr,runtimeAttributes[attr].start,runtimeAttributes[attr].end),runtimeAttributes[attr].unit);}
actualFrames+=1;};var onComplete=function(){var actual_duration=(new Date()-startTime)/1000;var data={duration:actual_duration,frames:actualFrames,fps:actualFrames/actual_duration};data.toString=function(){return('duration: '+data.duration+', frames: '+data.frames+', fps: '+data.fps);};isAnimated=false;actualFrames=0;this.onComplete.fire(data);};this._onStart=new YAHOO.util.CustomEvent('_start',this,true);this.onStart=new YAHOO.util.CustomEvent('start',this);this.onTween=new YAHOO.util.CustomEvent('tween',this);this._onTween=new YAHOO.util.CustomEvent('_tween',this,true);this.onComplete=new YAHOO.util.CustomEvent('complete',this);this._onComplete=new YAHOO.util.CustomEvent('_complete',this,true);this._onStart.subscribe(onStart);this._onTween.subscribe(onTween);this._onComplete.subscribe(onComplete);}};YAHOO.util.AnimMgr=new function(){var thread=null;var queue=[];var tweenCount=0;this.fps=1000;this.delay=1;this.registerElement=function(tween){queue[queue.length]=tween;tweenCount+=1;tween._onStart.fire();this.start();};this.unRegister=function(tween,index){tween._onComplete.fire();index=index||getIndex(tween);if(index==-1){return false;}
queue.splice(index,1);tweenCount-=1;if(tweenCount<=0){this.stop();}
return true;};this.start=function(){if(thread===null){thread=setInterval(this.run,this.delay);}};this.stop=function(tween){if(!tween){clearInterval(thread);for(var i=0,len=queue.length;i<len;++i){if(queue[0].isAnimated()){this.unRegister(queue[0],0);}}
queue=[];thread=null;tweenCount=0;}
else{this.unRegister(tween);}};this.run=function(){for(var i=0,len=queue.length;i<len;++i){var tween=queue[i];if(!tween||!tween.isAnimated()){continue;}
if(tween.currentFrame<tween.totalFrames||tween.totalFrames===null)
{tween.currentFrame+=1;if(tween.useSeconds){correctFrame(tween);}
tween._onTween.fire();}
else{YAHOO.util.AnimMgr.stop(tween,i);}}};var getIndex=function(anim){for(var i=0,len=queue.length;i<len;++i){if(queue[i]==anim){return i;}}
return-1;};var correctFrame=function(tween){var frames=tween.totalFrames;var frame=tween.currentFrame;var expected=(tween.currentFrame*tween.duration*1000/tween.totalFrames);var elapsed=(new Date()-tween.getStartTime());var tweak=0;if(elapsed<tween.duration*1000){tweak=Math.round((elapsed/expected-1)*tween.currentFrame);}else{tweak=frames-(frame+1);}
if(tweak>0&&isFinite(tweak)){if(tween.currentFrame+tweak>=frames){tweak=frames-(frame+1);}
tween.currentFrame+=tweak;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(points,t){var n=points.length;var tmp=[];for(var i=0;i<n;++i){tmp[i]=[points[i][0],points[i][1]];}
for(var j=1;j<n;++j){for(i=0;i<n-j;++i){tmp[i][0]=(1-t)*tmp[i][0]+t*tmp[parseInt(i+1,10)][0];tmp[i][1]=(1-t)*tmp[i][1]+t*tmp[parseInt(i+1,10)][1];}}
return[tmp[0][0],tmp[0][1]];};};(function(){YAHOO.util.ColorAnim=function(el,attributes,duration,method){YAHOO.util.ColorAnim.superclass.constructor.call(this,el,attributes,duration,method);};YAHOO.extend(YAHOO.util.ColorAnim,YAHOO.util.Anim);var Y=YAHOO.util;var superclass=Y.ColorAnim.superclass;var proto=Y.ColorAnim.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("ColorAnim "+id);};proto.patterns.color=/color$/i;proto.patterns.rgb=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i;proto.patterns.hex=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i;proto.patterns.hex3=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i;proto.patterns.transparent=/^transparent|rgba\(0, 0, 0, 0\)$/;proto.parseColor=function(s){if(s.length==3){return s;}
var c=this.patterns.hex.exec(s);if(c&&c.length==4){return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)];}
c=this.patterns.rgb.exec(s);if(c&&c.length==4){return[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10)];}
c=this.patterns.hex3.exec(s);if(c&&c.length==4){return[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)];}
return null;};proto.getAttribute=function(attr){var el=this.getEl();if(this.patterns.color.test(attr)){var val=YAHOO.util.Dom.getStyle(el,attr);if(this.patterns.transparent.test(val)){var parent=el.parentNode;val=Y.Dom.getStyle(parent,attr);while(parent&&this.patterns.transparent.test(val)){parent=parent.parentNode;val=Y.Dom.getStyle(parent,attr);if(parent.tagName.toUpperCase()=='HTML'){val='#fff';}}}}else{val=superclass.getAttribute.call(this,attr);}
return val;};proto.doMethod=function(attr,start,end){var val;if(this.patterns.color.test(attr)){val=[];for(var i=0,len=start.length;i<len;++i){val[i]=superclass.doMethod.call(this,attr,start[i],end[i]);}
val='rgb('+Math.floor(val[0])+','+Math.floor(val[1])+','+Math.floor(val[2])+')';}
else{val=superclass.doMethod.call(this,attr,start,end);}
return val;};proto.setRuntimeAttribute=function(attr){superclass.setRuntimeAttribute.call(this,attr);if(this.patterns.color.test(attr)){var attributes=this.attributes;var start=this.parseColor(this.runtimeAttributes[attr].start);var end=this.parseColor(this.runtimeAttributes[attr].end);if(typeof attributes[attr]['to']==='undefined'&&typeof attributes[attr]['by']!=='undefined'){end=this.parseColor(attributes[attr].by);for(var i=0,len=start.length;i<len;++i){end[i]=start[i]+end[i];}}
this.runtimeAttributes[attr].start=start;this.runtimeAttributes[attr].end=end;}};})();YAHOO.util.Easing={easeNone:function(t,b,c,d){return c*t/d+b;},easeIn:function(t,b,c,d){return c*(t/=d)*t+b;},easeOut:function(t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeBoth:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t+b;}
return-c/2*((--t)*(t-2)-1)+b;},easeInStrong:function(t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutStrong:function(t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeBothStrong:function(t,b,c,d){if((t/=d/2)<1){return c/2*t*t*t*t+b;}
return-c/2*((t-=2)*t*t*t-2)+b;},elasticIn:function(t,b,c,d,a,p){if(t==0){return b;}
if((t/=d)==1){return b+c;}
if(!p){p=d*.3;}
if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else{var s=p/(2*Math.PI)*Math.asin(c/a);}
return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},elasticOut:function(t,b,c,d,a,p){if(t==0){return b;}
if((t/=d)==1){return b+c;}
if(!p){p=d*.3;}
if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else{var s=p/(2*Math.PI)*Math.asin(c/a);}
return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},elasticBoth:function(t,b,c,d,a,p){if(t==0){return b;}
if((t/=d/2)==2){return b+c;}
if(!p){p=d*(.3*1.5);}
if(!a||a<Math.abs(c)){a=c;var s=p/4;}
else{var s=p/(2*Math.PI)*Math.asin(c/a);}
if(t<1){return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;}
return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},backIn:function(t,b,c,d,s){if(typeof s=='undefined'){s=1.70158;}
return c*(t/=d)*t*((s+1)*t-s)+b;},backOut:function(t,b,c,d,s){if(typeof s=='undefined'){s=1.70158;}
return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},backBoth:function(t,b,c,d,s){if(typeof s=='undefined'){s=1.70158;}
if((t/=d/2)<1){return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;}
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},bounceIn:function(t,b,c,d){return c-YAHOO.util.Easing.bounceOut(d-t,0,c,d)+b;},bounceOut:function(t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}
return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;},bounceBoth:function(t,b,c,d){if(t<d/2){return YAHOO.util.Easing.bounceIn(t*2,0,c,d)*.5+b;}
return YAHOO.util.Easing.bounceOut(t*2-d,0,c,d)*.5+c*.5+b;}};(function(){YAHOO.util.Motion=function(el,attributes,duration,method){if(el){YAHOO.util.Motion.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Motion,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Motion.superclass;var proto=Y.Motion.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Motion "+id);};proto.patterns.points=/^points$/i;proto.setAttribute=function(attr,val,unit){if(this.patterns.points.test(attr)){unit=unit||'px';superclass.setAttribute.call(this,'left',val[0],unit);superclass.setAttribute.call(this,'top',val[1],unit);}else{superclass.setAttribute.call(this,attr,val,unit);}};proto.getAttribute=function(attr){if(this.patterns.points.test(attr)){var val=[superclass.getAttribute.call(this,'left'),superclass.getAttribute.call(this,'top')];}else{val=superclass.getAttribute.call(this,attr);}
return val;};proto.doMethod=function(attr,start,end){var val=null;if(this.patterns.points.test(attr)){var t=this.method(this.currentFrame,0,100,this.totalFrames)/100;val=Y.Bezier.getPosition(this.runtimeAttributes[attr],t);}else{val=superclass.doMethod.call(this,attr,start,end);}
return val;};proto.setRuntimeAttribute=function(attr){if(this.patterns.points.test(attr)){var el=this.getEl();var attributes=this.attributes;var start;var control=attributes['points']['control']||[];var end;var i,len;if(control.length>0&&!(control[0]instanceof Array)){control=[control];}else{var tmp=[];for(i=0,len=control.length;i<len;++i){tmp[i]=control[i];}
control=tmp;}
if(Y.Dom.getStyle(el,'position')=='static'){Y.Dom.setStyle(el,'position','relative');}
if(isset(attributes['points']['from'])){Y.Dom.setXY(el,attributes['points']['from']);}
else{Y.Dom.setXY(el,Y.Dom.getXY(el));}
start=this.getAttribute('points');if(isset(attributes['points']['to'])){end=translateValues.call(this,attributes['points']['to'],start);var pageXY=Y.Dom.getXY(this.getEl());for(i=0,len=control.length;i<len;++i){control[i]=translateValues.call(this,control[i],start);}}else if(isset(attributes['points']['by'])){end=[start[0]+attributes['points']['by'][0],start[1]+attributes['points']['by'][1]];for(i=0,len=control.length;i<len;++i){control[i]=[start[0]+control[i][0],start[1]+control[i][1]];}}
this.runtimeAttributes[attr]=[start];if(control.length>0){this.runtimeAttributes[attr]=this.runtimeAttributes[attr].concat(control);}
this.runtimeAttributes[attr][this.runtimeAttributes[attr].length]=end;}
else{superclass.setRuntimeAttribute.call(this,attr);}};var translateValues=function(val,start){var pageXY=Y.Dom.getXY(this.getEl());val=[val[0]-pageXY[0]+start[0],val[1]-pageXY[1]+start[1]];return val;};var isset=function(prop){return(typeof prop!=='undefined');};})();(function(){YAHOO.util.Scroll=function(el,attributes,duration,method){if(el){YAHOO.util.Scroll.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Scroll.superclass;var proto=Y.Scroll.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Scroll "+id);};proto.doMethod=function(attr,start,end){var val=null;if(attr=='scroll'){val=[this.method(this.currentFrame,start[0],end[0]-start[0],this.totalFrames),this.method(this.currentFrame,start[1],end[1]-start[1],this.totalFrames)];}else{val=superclass.doMethod.call(this,attr,start,end);}
return val;};proto.getAttribute=function(attr){var val=null;var el=this.getEl();if(attr=='scroll'){val=[el.scrollLeft,el.scrollTop];}else{val=superclass.getAttribute.call(this,attr);}
return val;};proto.setAttribute=function(attr,val,unit){var el=this.getEl();if(attr=='scroll'){el.scrollLeft=val[0];el.scrollTop=val[1];}else{superclass.setAttribute.call(this,attr,val,unit);}};})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.3.0",build:"442"});

/* Connection: http://yui.yahooapis.com/2.3.0/build/connection/connection-min.js */
YAHOO.util.Connect={_msxml_progid:['MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:'application/x-www-form-urlencoded; charset=UTF-8',_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(e){var obj=YAHOO.util.Event.getTarget(e);if(obj.type=='submit'){YAHOO.util.Connect._submitElementValue=encodeURIComponent(obj.name)+"="+encodeURIComponent(obj.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(id)
{this._msxml_progid.unshift(id);},setDefaultPostHeader:function(b)
{this._use_default_post_header=b;},setDefaultXhrHeader:function(b)
{this._use_default_xhr_header=b;},setPollingInterval:function(i)
{if(typeof i=='number'&&isFinite(i)){this._polling_interval=i;}},createXhrObject:function(transactionId)
{var obj,http;try
{http=new XMLHttpRequest();obj={conn:http,tId:transactionId};}
catch(e)
{for(var i=0;i<this._msxml_progid.length;++i){try
{http=new ActiveXObject(this._msxml_progid[i]);obj={conn:http,tId:transactionId};break;}
catch(e){}}}
finally
{return obj;}},getConnectionObject:function(isFileUpload)
{var o;var tId=this._transaction_id;try
{if(!isFileUpload){o=this.createXhrObject(tId);}
else{o={};o.tId=tId;o.isUpload=true;}
if(o){this._transaction_id++;}}
catch(e){}
finally
{return o;}},asyncRequest:function(method,uri,callback,postData)
{var o=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();if(!o){return null;}
else{if(callback&&callback.customevents){this.initCustomEvents(o,callback);}
if(this._isFormSubmit){if(this._isFileUpload){this.uploadFile(o,callback,uri,postData);return o;}
if(method.toUpperCase()=='GET'){if(this._sFormData.length!==0){uri+=((uri.indexOf('?')==-1)?'?':'&')+this._sFormData;}
else{uri+="?"+this._sFormData;}}
else if(method.toUpperCase()=='POST'){postData=postData?this._sFormData+"&"+postData:this._sFormData;}}
o.conn.open(method,uri,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(this._isFormSubmit||(postData&&this._use_default_post_header)){this.initHeader('Content-Type',this._default_post_header);if(this._isFormSubmit){this.resetFormState();}}
if(this._has_default_headers||this._has_http_headers){this.setHeader(o);}
this.handleReadyState(o,callback);o.conn.send(postData||null);this.startEvent.fire(o);if(o.startEvent){o.startEvent.fire(o);}
return o;}},initCustomEvents:function(o,callback)
{for(var prop in callback.customevents){if(this._customEvents[prop][0]){o[this._customEvents[prop][0]]=new YAHOO.util.CustomEvent(this._customEvents[prop][1],(callback.scope)?callback.scope:null);o[this._customEvents[prop][0]].subscribe(callback.customevents[prop]);}}},handleReadyState:function(o,callback)
{var oConn=this;if(callback&&callback.timeout){this._timeOut[o.tId]=window.setTimeout(function(){oConn.abort(o,callback,true);},callback.timeout);}
this._poll[o.tId]=window.setInterval(function(){if(o.conn&&o.conn.readyState===4){window.clearInterval(oConn._poll[o.tId]);delete oConn._poll[o.tId];if(callback&&callback.timeout){window.clearTimeout(oConn._timeOut[o.tId]);delete oConn._timeOut[o.tId];}
oConn.completeEvent.fire(o);if(o.completeEvent){o.completeEvent.fire(o);}
oConn.handleTransactionResponse(o,callback);}},this._polling_interval);},handleTransactionResponse:function(o,callback,isAbort)
{if(!callback){this.releaseObject(o);return;}
var httpStatus,responseObject;try
{if(o.conn.status!==undefined&&o.conn.status!==0){httpStatus=o.conn.status;}
else{httpStatus=13030;}}
catch(e){httpStatus=13030;}
if(httpStatus>=200&&httpStatus<300||httpStatus===1223){responseObject=this.createResponseObject(o,callback.argument);if(callback.success){if(!callback.scope){callback.success(responseObject);}
else{callback.success.apply(callback.scope,[responseObject]);}}
this.successEvent.fire(responseObject);if(o.successEvent){o.successEvent.fire(responseObject);}}
else{switch(httpStatus){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:responseObject=this.createExceptionObject(o.tId,callback.argument,(isAbort?isAbort:false));if(callback.failure){if(!callback.scope){callback.failure(responseObject);}
else{callback.failure.apply(callback.scope,[responseObject]);}}
break;default:responseObject=this.createResponseObject(o,callback.argument);if(callback.failure){if(!callback.scope){callback.failure(responseObject);}
else{callback.failure.apply(callback.scope,[responseObject]);}}}
this.failureEvent.fire(responseObject);if(o.failureEvent){o.failureEvent.fire(responseObject);}}
this.releaseObject(o);responseObject=null;},createResponseObject:function(o,callbackArg)
{var obj={};var headerObj={};try
{var headerStr=o.conn.getAllResponseHeaders();var header=headerStr.split('\n');for(var i=0;i<header.length;i++){var delimitPos=header[i].indexOf(':');if(delimitPos!=-1){headerObj[header[i].substring(0,delimitPos)]=header[i].substring(delimitPos+2);}}}
catch(e){}
obj.tId=o.tId;obj.status=(o.conn.status==1223)?204:o.conn.status;obj.statusText=(o.conn.status==1223)?"No Content":o.conn.statusText;obj.getResponseHeader=headerObj;obj.getAllResponseHeaders=headerStr;obj.responseText=o.conn.responseText;obj.responseXML=o.conn.responseXML;if(typeof callbackArg!==undefined){obj.argument=callbackArg;}
return obj;},createExceptionObject:function(tId,callbackArg,isAbort)
{var COMM_CODE=0;var COMM_ERROR='communication failure';var ABORT_CODE=-1;var ABORT_ERROR='transaction aborted';var obj={};obj.tId=tId;if(isAbort){obj.status=ABORT_CODE;obj.statusText=ABORT_ERROR;}
else{obj.status=COMM_CODE;obj.statusText=COMM_ERROR;}
if(callbackArg){obj.argument=callbackArg;}
return obj;},initHeader:function(label,value,isDefault)
{var headerObj=(isDefault)?this._default_headers:this._http_headers;if(headerObj[label]===undefined){headerObj[label]=value;}
else{headerObj[label]=value+","+headerObj[label];}
if(isDefault){this._has_default_headers=true;}
else{this._has_http_headers=true;}},setHeader:function(o)
{if(this._has_default_headers){for(var prop in this._default_headers){if(YAHOO.lang.hasOwnProperty(this._default_headers,prop)){o.conn.setRequestHeader(prop,this._default_headers[prop]);}}}
if(this._has_http_headers){for(var prop in this._http_headers){if(YAHOO.lang.hasOwnProperty(this._http_headers,prop)){o.conn.setRequestHeader(prop,this._http_headers[prop]);}}
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(formId,isUpload,secureUri)
{this.resetFormState();var oForm;if(typeof formId=='string'){oForm=(document.getElementById(formId)||document.forms[formId]);}
else if(typeof formId=='object'){oForm=formId;}
else{return;}
if(isUpload){var io=this.createFrame(secureUri?secureUri:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=oForm;return;}
var oElement,oName,oValue,oDisabled;var hasSubmit=false;for(var i=0;i<oForm.elements.length;i++){oElement=oForm.elements[i];oDisabled=oForm.elements[i].disabled;oName=oForm.elements[i].name;oValue=oForm.elements[i].value;if(!oDisabled&&oName)
{switch(oElement.type)
{case'select-one':case'select-multiple':for(var j=0;j<oElement.options.length;j++){if(oElement.options[j].selected){if(window.ActiveXObject){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oElement.options[j].attributes['value'].specified?oElement.options[j].value:oElement.options[j].text)+'&';}
else{this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oElement.options[j].hasAttribute('value')?oElement.options[j].value:oElement.options[j].text)+'&';}}}
break;case'radio':case'checkbox':if(oElement.checked){this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';}
break;case'file':case undefined:case'reset':case'button':break;case'submit':if(hasSubmit===false){if(this._hasSubmitListener&&this._submitElementValue){this._sFormData+=this._submitElementValue+'&';}
else{this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';}
hasSubmit=true;}
break;default:this._sFormData+=encodeURIComponent(oName)+'='+encodeURIComponent(oValue)+'&';}}}
this._isFormSubmit=true;this._sFormData=this._sFormData.substr(0,this._sFormData.length-1);return this._sFormData;},resetFormState:function(){this._isFormSubmit=false;this._isFileUpload=false;this._formNode=null;this._sFormData="";},createFrame:function(secureUri){var frameId='yuiIO'+this._transaction_id;var io;if(window.ActiveXObject){io=document.createElement('<iframe id="'+frameId+'" name="'+frameId+'" />');if(typeof secureUri=='boolean'){io.src='javascript:false';}
else if(typeof secureURI=='string'){io.src=secureUri;}}
else{io=document.createElement('iframe');io.id=frameId;io.name=frameId;}
io.style.position='absolute';io.style.top='-1000px';io.style.left='-1000px';document.body.appendChild(io);},appendPostData:function(postData)
{var formElements=[];var postMessage=postData.split('&');for(var i=0;i<postMessage.length;i++){var delimitPos=postMessage[i].indexOf('=');if(delimitPos!=-1){formElements[i]=document.createElement('input');formElements[i].type='hidden';formElements[i].name=postMessage[i].substring(0,delimitPos);formElements[i].value=postMessage[i].substring(delimitPos+1);this._formNode.appendChild(formElements[i]);}}
return formElements;},uploadFile:function(o,callback,uri,postData){var frameId='yuiIO'+o.tId;var uploadEncoding='multipart/form-data';var io=document.getElementById(frameId);var oConn=this;var rawFormAttributes={action:this._formNode.getAttribute('action'),method:this._formNode.getAttribute('method'),target:this._formNode.getAttribute('target')};this._formNode.setAttribute('action',uri);this._formNode.setAttribute('method','POST');this._formNode.setAttribute('target',frameId);if(this._formNode.encoding){this._formNode.setAttribute('encoding',uploadEncoding);}
else{this._formNode.setAttribute('enctype',uploadEncoding);}
if(postData){var oElements=this.appendPostData(postData);}
this._formNode.submit();this.startEvent.fire(o);if(o.startEvent){o.startEvent.fire(o);}
if(callback&&callback.timeout){this._timeOut[o.tId]=window.setTimeout(function(){oConn.abort(o,callback,true);},callback.timeout);}
if(oElements&&oElements.length>0){for(var i=0;i<oElements.length;i++){this._formNode.removeChild(oElements[i]);}}
for(var prop in rawFormAttributes){if(YAHOO.lang.hasOwnProperty(rawFormAttributes,prop)){if(rawFormAttributes[prop]){this._formNode.setAttribute(prop,rawFormAttributes[prop]);}
else{this._formNode.removeAttribute(prop);}}}
this.resetFormState();var uploadCallback=function()
{if(callback&&callback.timeout){window.clearTimeout(oConn._timeOut[o.tId]);delete oConn._timeOut[o.tId];}
oConn.completeEvent.fire(o);if(o.completeEvent){o.completeEvent.fire(o);}
var obj={};obj.tId=o.tId;obj.argument=callback.argument;try
{obj.responseText=io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:io.contentWindow.document.documentElement.textContent;obj.responseXML=io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;}
catch(e){}
if(callback&&callback.upload){if(!callback.scope){callback.upload(obj);}
else{callback.upload.apply(callback.scope,[obj]);}}
oConn.uploadEvent.fire(obj);if(o.uploadEvent){o.uploadEvent.fire(obj);}
if(YAHOO.util.Event){YAHOO.util.Event.removeListener(io,"load",uploadCallback);}
else if(window.detachEvent){io.detachEvent('onload',uploadCallback);}
else{io.removeEventListener('load',uploadCallback,false);}
setTimeout(function(){document.body.removeChild(io);oConn.releaseObject(o);},100);};if(YAHOO.util.Event){YAHOO.util.Event.addListener(io,"load",uploadCallback);}
else if(window.attachEvent){io.attachEvent('onload',uploadCallback);}
else{io.addEventListener('load',uploadCallback,false);}},abort:function(o,callback,isTimeout)
{var abortStatus;if(o.conn){if(this.isCallInProgress(o)){o.conn.abort();window.clearInterval(this._poll[o.tId]);delete this._poll[o.tId];if(isTimeout){window.clearTimeout(this._timeOut[o.tId]);delete this._timeOut[o.tId];}
abortStatus=true;}}
else if(o.isUpload===true){var frameId='yuiIO'+o.tId;var io=document.getElementById(frameId);if(io){document.body.removeChild(io);if(isTimeout){window.clearTimeout(this._timeOut[o.tId]);delete this._timeOut[o.tId];}
abortStatus=true;}}
else{abortStatus=false;}
if(abortStatus===true){this.abortEvent.fire(o);if(o.abortEvent){o.abortEvent.fire(o);}
this.handleTransactionResponse(o,callback,true);}
else{}
return abortStatus;},isCallInProgress:function(o)
{if(o&&o.conn){return o.conn.readyState!==4&&o.conn.readyState!==0;}
else if(o&&o.isUpload===true){var frameId='yuiIO'+o.tId;return document.getElementById(frameId)?true:false;}
else{return false;}},releaseObject:function(o)
{if(o.conn){o.conn=null;}
o=null;}};YAHOO.register("connection",YAHOO.util.Connect,{version:"2.3.0",build:"442"});


/**
 * health_core.js
 *
 * Core Health-namespaced Javascript
 */


/* strip_1.10.js */
/*** be sure to: yinst set mbi_instrumentation_conf.CLEANURL=off ***/
if(!YAHOO.ULT){YAHOO.ULT={};}
if(!YAHOO.ULT.CONF){YAHOO.ULT.CONF={};}
if(!YAHOO.ULT.BEACON){YAHOO.ULT.BEACON="http://geo.yahoo.com/t";}
if(!YAHOO.ULT.IMG){YAHOO.ULT.IMG=new Image();}
if(typeof(YAHOO.ULT.DEBUG)==="undefined"){YAHOO.ULT.DEBUG=0;}
YAHOO.ULT.DELIMITERS={'/':'P',';':'1','?':'P','&':'1'};(function(){var YLT=YAHOO.ULT;YLT.set_href=function(el,data,keyname){if(data.html){el.href=data[keyname];el.innerHTML=data.html;}else{el.href=data[keyname];}};YLT.strip_rd=function(u,data){var idx=u.indexOf('/**');if(idx!=-1){data.clean=u.substr(idx+3);data.clean=decodeURIComponent(data.clean);}
return data;};YLT.strip=function(u){var delims=YLT.DELIMITERS;var data={url:u,clean:'',cookie:'',keys:[]};var idx=0;while(u.indexOf('_yl',idx)!=-1){var start=u.indexOf('_yl',idx);if(idx<start){data.clean+=u.slice(idx,start-1);}
idx=start+3;if(delims[u.charAt(start-1)]&&u.charAt(start+4)==='='){data.ult=1;var key="_yl"+u.charAt(start+3);var value="";for(start=start+5;start<u.length&&!delims[u.charAt(start)];start++){value+=u.charAt(start);}
data.keys.push(key);data[key]=value;if(key!='_ylv'){data.cookie+="&"+key+"="+value;}
if(delims[u.charAt(start)]&&delims[u.charAt(start)]=='P'){data.clean+=u.charAt(start);}
idx=start+1;}else{data.clean+=u.slice(start-1,idx);}}
if(data.ult){data.cookie=data.cookie.substr(1);data.clean+=u.substr(idx);YLT.strip_rd(u,data);}
return data;};YLT.clnclk=function(e,data){var el=e.target||e.srcElement;if(data._ylv==3){var cook="D="+data.cookie+"; Max-Age=10; Path=/; Domain=.yahoo.com";document.cookie=cook;}else{var src=YLT.BEACON+"?"+data.cookie+'&t='+Math.random();if(e.altKey||e.ctrlKey||e.shiftKey||data.target=="_blank"){}else{YLT.IMG.onerror=YLT.IMG.onload=function(){location=data.clean;};YAHOO.util.Event.preventDefault(e);}
YLT.IMG.src=src;}};YLT.clicked=function(e,data){var el=e.target||e.srcElement;if(el.nodeName!=="A"){if(el.parentNode.nodeName==="A"){el=el.parentNode;}}
if(data._ylv==3){YLT.set_href(el,data,"clean");var cook="D="+data.cookie+"; Max-Age=10; Path=/; Domain=.yahoo.com";document.cookie=cook;}else if(e.altKey||e.ctrlKey||e.shiftKey){}else if(data._ylv==8||data._ylv==9){}else{var src=YLT.BEACON+"?"+data.cookie+'&t='+Math.random();if(data.target=="_blank"){YLT.set_href(el,data,"clean");}else{YLT.IMG.onerror=YLT.IMG.onload=function(){location=data.clean;};YAHOO.util.Event.preventDefault(e);}
YLT.IMG.src=src;}};YLT.revert=function(e,data){var el=e.target||e.srcElement;if(el.nodeName==="A"){YLT.set_href(el,data,"url");}else{if(el.parentNode.nodeName==="A"){el.parentNode.href=data.url;}}};YLT.clean=function(){YLT.isIE=(typeof(ActiveXObject)=='function');if(navigator.userAgent.toLowerCase().indexOf("safari")!=-1){YLT.isSafari=true;}
for(var i=0;i<document.links.length;i++){var el=document.links[i];if(el.className.indexOf('yltasis')!=-1){continue;}
var data=YLT.strip(el.getAttribute('href',2));var name;if(!data.ult){continue;}else if(YLT.isSafari&&data._ylv!=3){continue;}
for(name=0;name<data.keys.length;name++){if(data.keys[name]!='_ylv'){delete data[data.keys[name]];}}
delete data.keys;delete data.ult;data.target=el.target;if(YLT.isIE&&(el.innerHTML.indexOf('http')===0||el.className.indexOf('yltiefix')!=-1)){data.html=el.innerHTML;}
YLT.set_href(el,data,"clean");if(YLT.CONF.cleanest){YAHOO.util.Event.addListener(el,'click',YLT.clnclk,data);}else{YAHOO.util.Event.addListener(el,'click',YLT.clicked,data);YAHOO.util.Event.addListener(el,'mousedown',YLT.revert,data);}}};})();

// execute clean 1.5 seconds after load, best to execute other onloads before this
YAHOO.util.Event.addListener( window, "load", function(){ setTimeout(function(){ YAHOO.ULT.clean(); },1500); } );


/* ******************************************************************** */
(function() { // begin use scope for cleanliness (commence gargle... pun intended)


/**
 * DTK Stuff (must come before Health namespaced items)
 */

// shorthand.
var $U=YAHOO.util;
var $D=$U.Dom;
var $E=$U.Event;
var $A=$U.Anim;

var DTK=YAHOO.namespace('Media.Dtk');
YAHOO.namespace('Media.Dtk.util');


/* ----------------------------------------------------------------------------------------------------- */
// toString function for the Media.Dtk collection.
DTK.toString=function(){
	var s=[];
	for(var i in this){
		if(typeof(this[i])=='function'){
			s.push(i+': [function]');
		} else {
			s.push(i+': '+this[i].toString());
		}
	}
	return 'YAHOO.Media.Dtk = '+s.join(', \n');
};
DTK.util.toString=function(){
	var s=[];
	for(var i in this){
		if(typeof(this[i])=='function'){
			s.push(i+': [function]');
		} else {
			s.push(i+': '+this[i].toString());
		}
	}
	return '{\n\t' + s.join(', \n\t') + '\n}';
};

/* ----------------------------------------------------------------------------------------------- */
// end toString functions.


/**************************************************** begin DTK.util ***********************************************************/
/* ----------------------------------------------------------------------------------------------- */
DTK.util.clickFn=function(e,sfa){
	if(this.didMouseDown){try{this.blur();}catch(ex){}}
	else{sfa.f.call(sfa.s||window,sfa.a);}
	this.didMouseDown=(e.type=='mousedown');
	$E.stopEvent(e);
	return false;
};
/* ------------------------------------------------------------------------------------------------ */



/* ------------------------------------------------------------------------------------------------ */
// Begin util.Cookie
DTK.util.Cookie = {
	jar: {},
    get: function (name,refresh) {
		if(this.jar[name]&&this.jar[name].value&&!refresh) {
			return this.jar[name].value;
		}
        var value = false, c = ' ' + document.cookie + ';';
		var s = c.split((' ' + name + '='));
        if (s.length > 1) {
			s=s[1].split(';')[0];
			value=unescape(s);
			this.jar[name]={'value':value, toString:function(){return '[Cookie] '+name+': '+value;}};
        }
		return value;
    },
	getObj : function(name,refresh) {
		if(this.jar[name] && this.jar[name].obj&&!refresh) {
			return this.jar[name].obj;
		}
		var s=this.get(name,refresh);
		if(s===false) {
			return null;
		}
		var a=s.split('&'), aa={}, t,j;
		for(var i=a.length-1;i>-1;i--) {
			//keep empty values from screwing it up
			if(a[i]==='=') { continue; }
			j=a[i].indexOf('=');
			if(j===-1){
				aa[a[i]]='';
			}else{
				aa[a[i].substr(0,j)]=a[i].substr(j+1);
			}
		}
		this.jar[name].obj = aa;
		this.jar[name].obj.toString=function(){return '[Cookie] ' + name+': '+s;};
		return aa;
	},
    set: function (args) {
		args=args||{};
		if(!args.name){
			return false;
		}
		var name=args.name;
		if(!this.jar[name]){
			this.jar[name]={};
		}
		var j=this.jar[name];
		var jj={};

		var path=args.path||j.path||'/';
		var days=args.days||j.days||0;
		var value=args.value||j.value||'';
		var domain=args.domain||j.domain||window.location.hostname||'';
		var secure = (args.secure===false||args.secure) ? !!args.secure : !!j.secure;

		if(domain.indexOf('.yahoo.com')===-1) {
			domain+='.yahoo.com';
		}
		if(domain.indexOf(':')!==-1){
			domain=domain.split(':')[0];
		}
		while(domain.indexOf('..')!==-1) {
			domain=domain.replace(/\.\./g,'.');
		}

		if(typeof(value)==='object') {
			var v=value;
			value=[];
			for(var i in v) {
				if(typeof(v[i])!='function'&&typeof(v[i]!='object')&&i!=='') {
					value[value.length] = ([i,v[i]]).join('=');
				}
			}
			value=value.join('&');
			v.toString=function(){return '[Cookie] '+name+': '+value;};
			jj.obj=v;
		}
		var d;
		if(days) {
			d=new Date();
			d.setTime( d.getTime() + days * 1000 * 60 * 60 * 24);
			d=';expires='+d.toGMTString();
		} else {
			d='';
		}

		jj.value=value;
		jj.days=days;
		jj.path=path;
		jj.domain=domain;
		jj.secure=secure;
		jj.toString=function(){return '[Cookie] '+name+': '+value;};

		jj.cstr=([name,"=",escape(value),d,";path=",path,";domain=",domain,(secure ? ';secure':'')]).join('');
		document.cookie = jj.cstr;

		// if it didn't get saved for some reason (invalid data or whatever), then don't commit changes to the cookie jar.
		if((this.get(name,true) === jj.value)) {
			this.jar[name]=jj;
			j=null;
			return true;
		} else {
			this.jar[name]=j;
			jj=null;
			return false;
		}
    },
	remove : function(name) {
		this.set({name:name,value:'',days:-1});
		delete this.jar[name];
		return true;
	}
};
/* ------------------------------------------------------------------------------------- */
// End util.Cookie



/* ------------------------------- */
(function(){ // begin util.Manager

var $C = $U.CustomEvent;
var spawn = function(cls,args) {
	if(!args instanceof Array){ args = [args]; }
	var f=function(){};
	f.prototype=cls.prototype;
	f.prototype.constructor = cls;
	var obj = new f();
	cls.apply(obj,args);
	return obj;
};

DTK.util.Manager = function(daemonClass) {
	var daemonEvents = {};
	var idCounter = [0];
	var p=daemonClass.prototype;

	if(typeof p.getId !== 'function') {
		p.getId = function(){
			if(this.id) {
				return this.id;
			}
			return (this.id = 'daemon_'+(idCounter[0]++));
		};
	}
	if(typeof p.toString !== 'function') {
		p.toString = function() {
			return 'Daemon ' + this.getId();
		};
	}
	this.onCreate = new $C('create',this);
	this.onDaemonEvent = new $C('daemonEvent'); // actual event time at firing time will likely be different.
	this.daemonClass = daemonClass;
	var unload = function(e){
		var s=this.stack;
		for(var i=s.length-1; i>-1; i--) {
			if(s[i]) {
				s[i].manager = null;
				if(typeof(s[i].unload) == 'function') {
					s[i].unload();
				}
				this.daemons[s[i].getId()] = null;
				s[i] = null;
			}
		}
	};
	$U.Event.addListener(window,'unload',unload,this,true);
};
DTK.util.Manager.prototype={
	daemons:{},
	stack:[],
	daemonEvents:{},
	spawnDaemon:function() {
		var obj = spawn(this.daemonClass,arguments);
		this.onCreate.fire(obj);
		return obj;
	},
	idString:'Generic Daemon Manager', // designed to be overwritten in classes that extend the Manager class.
	toString:function(){
		var s=[this.idString,'{\n'];
		for(var c in this.daemons) {
			if(this.daemons[c] instanceof this.daemonClass) {
				s.push('\t',c,' : (',this.daemons[c].toString(),')\n');
			}
		}
		s.push('}');
		return s.join('');
	},
	init:function() {
		var d=this.spawnDaemon.apply(this,arguments);

		if(d && d.manager != this) {
			var onDaemonEvent = this.onDaemonEvent;
			d.manager = this;
			this.daemons[d.getId()] = d;
			this.stack.push(d);
			for(var e in d){
				// walk through all the daemon's properties looking for customevents to watch for.
				// this implements a "bubbling" sort of functionality.
				if(d[e] instanceof $C) {
					if(!this.daemonEvents[e]) {
						this.daemonEvents[e]=new $C(d[e].type);
					}
					var evMgr = this.daemonEvents[e];
					var fn=function(type,data){
						// fire the manager's version of the child event, and the onDaemonEvent, as if they were the ones that happened in the first place -- same scope, same type, same everything.
						evMgr.scope=this;
						evMgr.fire.apply(evMgr,data);
						onDaemonEvent.scope=this;
						onDaemonEvent.type=type;
						onDaemonEvent.fire.apply(onDaemonEvent,data);
					};
					d[e].subscribe(fn);
				}
			}
		}
		return d;
	},
	initAll:function(finder) {
		if(typeof(finder) != 'function'){ return []; }
		var things = finder();
		var ret = [];
		var len = things.length;
		var args = [null];
		var arglen=arguments.length;
		for(var i=1;i<arglen;i++) {
			args.push(arguments[i]);
		}
		for(var i = 0; i < len; i++) {
			args[0] = things[i];
			var d=this.init.apply(this, args);
			if(d) {
				ret.push(d);
			}
		}
		return ret;
	},
	getDaemonById:function(id) {
		if(id.id){ return this.getDaemonById(id.id); }
		return this.daemons[id] || null;
	}
};

})(); // end util.manager scope

/* ------------------------------------------------------------------------------------------------------ */


/**************************************************** end DTK.util ***********************************************************/


/* ------------------------------------------------------------------------------------------------------ */
// begin myBar scope
(function(){
	var $C=DTK.util.Cookie;
	var cookieIndex=0;
	var cookie={};
	if(!!$C) {
		cookie=$C.getObj('MY')||{};
		$E.addListener(window,'unload',function(){$C.set({name:'MY',value:cookie,days:30,path:'/'});});
	}

	var myBarExpander=function(el,togglers) {
		var collapse=$D.get(el);
		this.cookieId=cookieIndex++;

		var tb=new myBarTabs(collapse);
		
		if (tb.tabs) {
			if(tb.tabs.length>0) {
				this.tabBox=tb;

				if( cookie[this.cookieId+'t'] || cookie[this.cookieId+'t']===0 ) {
					tb.clickTab(cookie[this.cookieId+'t']);
				} else if(tb.selected==-1) {
					tb.clickTab(0);
				}

				this.tabBox.tabChange.subscribe(function(e,i){cookie[this.cookieId+'t']=i[0];},this,true);
			}
			tb=null;
		}

		var mregion = $D.getRegion(collapse);
		$D.setStyle(collapse, 'height', '0'); // collapse it once we have the height
		var expandh = (mregion.bottom - mregion.top);
		if(this.tabBox) {
			if(this.tabBox.height > expandh) {
				expandh=this.tabBox.height;
			}
		}
		expandh+=5;
		var expandAtt = {
			height: {to: expandh }
		};
		var collapseAtt = {
			height: {to: 0 }
		};

		// this funky bit here is to make them all move at the same *speed* (~250px/sec), even though they might not be the same height.
		// who says physics classes would never be useful in the real world?
		var time = expandh / 250.0;

		this.expandAnim=new $A(collapse,expandAtt,time,YAHOO.util.Easing.easeOut);
		this.collapseAnim=new $A(collapse,collapseAtt,time,YAHOO.util.Easing.easeOut);
		togglers=togglers||[];
		this.togglers=[];
		for(var i=togglers.length-1;i>-1;i--){
			this.togglers.push(togglers[i]);
			$E.addListener(togglers[i],'click',DTK.util.clickFn,{s:this,f:this.toggle});
			$E.addListener(togglers[i],'mousedown',DTK.util.clickFn,{s:this,f:this.toggle});
			togglers[i]=null;
		}

		// find out if we're open or not. Opened by default, unless the cookie says otherwise (by being set to "c" for closed.)
		this.isOpen = (cookie[this.cookieId]==='c');
		this.toggle();
		collapse=null;
	};
	myBarExpander.prototype={
		unload:function(){
			if(this.tabBox) { this.tabBox.unload(); }
			for(var i=this.togglers.length-1;i>-1;i--){
				this.togglers[i].onmousedown=this.togglers[i].onclick=null;
				this.togglers[i]=null;
			}
			this.expandAnim=this.collapseAnim=null;
		},
		open:function(){
			if(this.isOpen) { return false; }
			if(this.collapseAnim.isAnimated()) {
				this.collapseAnim.stop();
			}
			this.expandAnim.animate();
			$D.replaceClass(this.togglers,'off','on');
			cookie[this.cookieId]='o';
			this.isOpen=true;
			return true;
		},
		close:function(){
			if(!this.isOpen) { return false; }
			if(this.expandAnim.isAnimated()) {
				this.expandAnim.stop();
			}
			this.collapseAnim.animate();
			$D.replaceClass(this.togglers,'on','off');
			cookie[this.cookieId]='c';
			//delete(cookie[this.cookieId]); // won't work, because some boxes default to open, so we need to let the cookie override that default.
			this.isOpen=false;
			return true;
		},
		toggle:function(){
			if(this.isOpen) {
				return this.close();
			} else {
				return this.open();
			}
		}
	};

	var myBarTabs=function(el){
		el=$D.get(el);
		if(!el) { return; }
		var contents=$D.getElementsByClassName('tab-contents','div',el);
		this.tabs=[];
		this.boxes=[];
		this.selected=-1;
		this.height = 0;
		if(contents.length>0) {
			this.init(contents);
		}
	};

	myBarTabs.prototype={
		init:function(contents){
			var cl=contents.length,t,b,clickThis=-1;
			for(var i=0;i<cl;i++){
				b=$D.getElementsByClassName('wrap','div',contents[i]);
				t=$D.getElementsByClassName('tabs','a',contents[i]);
				if(t.length>0&&b.length>0){
					t=t[0];
					b=b[0];
					var index=this.tabs.length;
					if($D.hasClass(t,'on')) {
						clickThis=index;
					}
					this.tabs.push(t);
					this.boxes.push(b);

					//get the height that it will be when it's showing, and don't be fooled by any CSS trickery!
					$D.replaceClass(b,'show','foobartab-show');
					$D.replaceClass(b,'hide','foobartab-hide');

					$D.addClass(b,'show');
					var h=$D.getRegion(b);
					h=h.bottom-h.top;
					if(h > this.height) {
						this.height=h;
					}
					
					$D.removeClass(b,'show');

					$D.replaceClass(b,'foobartab-show','show');
					$D.replaceClass(b,'foobartab-hide','hide');

					$E.addListener(t,'click',DTK.util.clickFn,{s:this,f:this.clickTab,a:index});
					$E.addListener(t,'mousedown',DTK.util.clickFn,{s:this,f:this.clickTab,a:index});

				}
				b=t=contents[i]=null;
			}
			this.tabChange=new $U.CustomEvent('tabchange');
			this.clickTab(clickThis);
		},
		unload:function(){
			if(this.tabs) {
				for(var i=this.tabs.length-1;i>-1;i--){
					this.tabs[i].onmousedown=this.tabs[i].onclick=null;
					this.tabs[i]=null;
				}
			}
			for(var i=this.boxes.length-1;i>-1;i--){
				this.boxes[i]=null;
			}
		},
		clickTab:function(index){
			if(!index&&index!==0||index<0||index==this.selected) { return; }
			for(var i=this.boxes.length-1;i>-1;i--){
				if(i==index){
					$D.replaceClass(this.tabs[i],'off','on');
					$D.replaceClass(this.boxes[i],'hide','show');
				} else {
					$D.replaceClass(this.tabs[i],'on','off');
					$D.replaceClass(this.boxes[i],'show','hide');
				}
			}
			this.selected=index;
			this.tabChange.fire(index);
		}
	};


	// Grr!!  i can't wait for IE 7.  memory management is not fun.
	var unload=function(){
		for(var e in DTK.myBar.expanders) {
			for(var i in DTK.myBar.expanders[e]) {
				DTK.myBar.expanders[e][i].unload();
			}
		}
	};
	$E.addListener(window,'unload',unload);

	DTK.myBar = function() {

		var expanders={};

		/**
		 * YAHOO.Media.Dtk.myBar.init
		 * @function
		 * @privileged
		 * @param el {HTMLElement | String} the HTML Element containing the myBar expanding modules, or its id.  This element must already be available.
		 * @param args {Object} Name-Value pairs to set the optional parameters.  They are:
		 *   modClass { String } The className of the modules. Default: 'mybar-mod'
		 *   toggleClass { String } The className of the toggle links.  Default: mybar-toggle;
		 *   collapseClass { String } The className of the collapsing sections of the modules. Default: mybar-collapse;
		 **/
		var init=function(el,args) {
			args=args||{};
			args.modClass=args.modClass||'mybar-mod';
			args.toggleClass=args.toggleClass||'mybar-toggle';
			args.collapseClass=args.collapseClass||'mybar-collapse';
			el=$D.get(el);
			if(!el) { return; }
			var id=$D.generateId(el);
			var content = $D.getElementsByClassName(args.modClass,"div",el);
			if (!content) { return; }
			var cl = content.length;
			expanders[id]=expanders[id]||{};
			// sort here by ID to guarantee that they're always in the same order for cookieId purposes;
			content.sort(function(a,b){return(a.id==b.id)?0:(a.id>b.id)?1:-1;});

			for (var x=0; x< cl; x++) {
				var collapse=$D.getElementsByClassName(args.collapseClass,'div',content[x])[0];
				var togglers=$D.getElementsByClassName(args.toggleClass,'a',content[x]);

				var mb=new myBarExpander(collapse,togglers);
				if(mb) {
					expanders[id][mb.cookieId]=mb;
				}
			}
			//collapse=togglers=bd=el=null;
			return expanders[id];
		};

		return {
			init:init,
			expanders:expanders
		};
	}();
})();
// end myBar scope
/* ------------------------------------------------------------------------------------------------------ */



/**
 * DTK Carousel Component.
 * @description http://twiki.corp.yahoo.com/view/Media/DTKCarousel
 * @requires DTK Manager Utility
 **/

// keep out of global scope.
(function() {

// shorthand
var $U=YAHOO.util;
var $D=$U.Dom;
var $E=$U.Event;
var $S=$U.Scroll;
var DTK=YAHOO.namespace('Media.Dtk');

var Carousel; // varred here, but defined inside its own scope.  This is the line in.
(function(){

// private static methods used by DTK.Carousel
/**
 * addPageIndicators Method
 * @description Adds the next/prev page indicators.
 * @private
 * @param C {Carousel Object} Reference to the carousel that is getting set up.
 **/
var addPageIndicators=function(C) {
	var n = document.createElement('div');

	n.className='scrollnav';
	var p=C.pages.length;
	for(var x=0;x<p;x++){
		var a=document.createElement('a');
		a.href='#pg:'+(x+1);
		a.index=x;
		a.carousel=C;
		a.onmousedown=a.onclick=C.scrollTo_click;
		if(x==C.current) {
			a.className='current';
		}
		n.appendChild(a);
	}
	var l=n.getElementsByTagName('a');
	C.navLinks=[];
	p=l.length;
	for(x=0;x<p;x++) {
		C.navLinks.push(l[x]);
	}
	l=null;

	var s=C.scrollBody;
	s.parentNode.insertBefore(n,s);
	return;
};

/**
 * addNavButtons Method
 * @description Adds the links to individual pages
 * @private
 * @param C {Carousel Object} Reference to the carousel that is getting set up.
 **/
var addNavButtons=function(C) {
	// create prev link
	var p=document.createElement('a'), n=p.cloneNode(true);
	var i=C.getElement();
	if(i) {
		i=i.id;
	}
	n.href=p.href="#"+i;

	// add appropriate classes to each
	p.className="prev";
	n.className="next";

	// insert nodes into dom before <div class="scrollbody">
	var s=C.scrollBody;
	s.parentNode.insertBefore(p, s);
	s.parentNode.insertBefore(n, s);

	// add handlers
	p.onmousedown=p.onclick=C.scrollPrev_click;
	n.onmousedown=n.onclick=C.scrollNext_click;

	C.prev=p;
	C.next=n;
	n.carousel=p.carousel=C;
	s=null;
};
/**
 * updateNavState Method
 * @description Update the state of the page/prev/next links.
 * @private
 * @param C {Carousel Object} Reference to the carousel that is getting updated.
 **/
var updateNavState=function(C) {
	// get # of pages
	var l = C.navLinks.length;

	// update page indicator styles
	for (var x=0; x<l; x++) {
		if(x == C.current) {
			C.navLinks[x].className='current';
		} else {
			C.navLinks[x].className='';
		}
	}
	// update button styles
	if(C.current === 0 && !C.roundRobin){
		// first page (left inactive)
		$D.addClass(C.prev,'off');
		$D.setStyle(C.prev,'opacity',0.6);
		$D.removeClass(C.next,'off');
		$D.setStyle(C.next,'opacity',1);
		$D.setStyle(C.next,'cursor','');
		$D.setStyle(C.prev,'cursor','default');
	}else if(C.current == (l-1) && !C.roundRobin){
		// last page (right inactive)
		$D.removeClass(C.prev,'off');
		$D.setStyle(C.prev,'opacity',1);
		$D.addClass(C.next,'off');
		$D.setStyle(C.next,'opacity',0.6);
		$D.setStyle(C.prev,'cursor','');
		$D.setStyle(C.next,'cursor','default');
	} else {
		// all other pages (all active)
		$D.removeClass(C.prev,'off');
		$D.setStyle(C.prev,'opacity',1);
		$D.removeClass(C.next,'off');
		$D.setStyle(C.next,'opacity',1);
		$D.setStyle(C.next,'cursor','');
		$D.setStyle(C.prev,'cursor','');
	}
};
/**
 * clickHandler method
 * @description Creates an event handler which can be assigned to a carousel A tag.  Used to create the scrollNext_click, scrollPrev_click, and scrollTo_click methods.
 * @private
 * @param whichFn {String} The name of the member function of the Carousel object to call, if appropriate.  Note: Not a function--send in the NAME of a function as a string.
 * @param fnFailure {Function} In addition to !a and !a.carousel, additional failure cases can be specified.  This function is called with the A tag passed as an arg.  If it returns True, then the carousel operation is aborted and normal behavior is used.
 * @param fnArgs {Function} This function can be specified to send additional arguments to the carousel function.  The A tag is passed as an argument, and the return value is sent to fnWhich.
 **/
var clickHandler=function(whichFn,fnFailure,fnArgs) {
	return function(e) {
		e=e||window.event;
		fnFailure=fnFailure || function(){return false;};
		fnArgs=fnArgs || function(){};
		var a=$E.getTarget(e);
		if(!a || !a.carousel || fnFailure(a)) {
			return true;
		}
		if(!a.didMouseDown) {
			// do the stuff, only the first time.
			a.carousel.autoPlay=false;
			a.carousel[whichFn](fnArgs(a));
		} else {
			// if we got a mousedown, then this is click, and it's time to blur.
			// flag will be reset on the next line.
			a.blur();
		}
		// record or reset.
		a.didMouseDown=(e.type=='mousedown');
		// break reference to prevent the leak.
		a=null;
		$E.stopEvent(e);
		return false;
	};
};

Carousel = function(el,args) {

	/**
	 * self-reference.
	 * @private
	 **/
	var me=this;
	/**
	 * currentScroll property
	 * Stores the current position of the scroller.
	 * @private
	 **/
	var currentScroll=0;
	/**
	 * getCurrentScroll method
	 * @return {Number} the current position of the scroller.
	 * @privileged
	 **/
	this.getCurrentScroll=function() {
		return currentScroll;
	};
	/**
	 * ontween Animation onTween handler.
	 * Used to keep track of the scrollLeft property of the scrollBody.
	 * @private
	 **/
	var ontween=function(e,data){
		// this is faster than just looking it up from the DOM.
		currentScroll=me.anim.doMethod('scroll', me.animAttrs.scroll.from, me.animAttrs.scroll.to)[0];
	};
	/**
	 * oncomplete Animation onComplete handler.
	 * Fires the onPageChange event.
	 * @private
	 **/
	var oncomplete=function(e,data){
		// only fire if it actually finished.
		if(data[0].duration >= me.animDur) {
//			alert('oncomplete! - ' + currentScroll);
			data=data[0];
			data.carousel=me;
			data._toString=data.toString;
			data.toString = function(){ return this._toString() + ', current page:' + this.carousel.current; };
			//data.toString=function(){return this.time.getTime()+' duration:'+this.duration+', frames:'+this.frames+', fps:'+this.fps+', carousel:'+this.carousel.toString();};
			me.onPageChange.fire(data);
		}
	};
	/**
	 * onclick Method
	 * Attached to click event of scrollBody
	 * Through event bubbling, fires whenever an element in the scrolling body is clicked, unless event is caught and killed before bubbling up.
	 * fires the onClick event.
	 * @private
	 **/
	var onclick=function(e) {
		me.onClick.fire(e);
	};
	/**
	 * element Object
	 * Reference to the root of the Carousel element.
	 * Accessible via the privileged getElement() method.
	 * @private
	 **/
	var _element=null;

	/**
	 * getElement prototype method
	 * @privileged
	 * @return {HTMLElement | null} The root element of the Carousel.
	 * @description Note: The element is not set until init is called.
	 **/
	this.getElement=function() {
		return _element;
	};
	/**
	 * init Method
	 * @param el { String | HTMLElement } ID of or reference to the root element of the carousel
	 * @param args { Object } Name-value pair of any public member items that should be replaced.  For example, you send it {easeMethod:YAHOO.util.easeNone,animDur:2} to overwrite the default easing method and animation duration.
	 *  With great power comes great responsibility!
	 * @description Typically called by CarouselMgr.init or CarouselMgr.initAll.
	 * @privileged
	 **/
	this.init=function(el,args) {
		el=$D.get(el);
		if(el) {
			_element=el;
		}
		s = $D.getElementsByClassName('scrollbody','div',el)[0];

		if(typeof(args) == 'object') {
			for(var i in args) {
				this[i]=args[i];
			}
		}


		var me=this;
		this.pages = $D.getElementsBy(function(el) { return me.pageFinder(el); },this.pageTagName,el);
		var list = this.pages;
		var len = list.length;

		if(!el || !s || !len) {
			return false;
		}

		// set up the exposed variables that don't exist pre-init.
		this.onScrollStart=new $U.CustomEvent('scrollstart',this);
		this.onPageChange=new $U.CustomEvent('scrollcomplete',this);
		this.onClick=new $U.CustomEvent('click',this);
		this.onAutoPlayStart=new $U.CustomEvent('autoplaystart',this);
		this.onAutoPlayStop=new $U.CustomEvent('autoplaystop',this);

		var r = $D.getRegion(list[0]);		// get region of first item, as all "page" items should be same width
		this.scrollDistance = r.right - r.left;			// width of first "page" item

		this.scrollBody = s;
		$E.addListener(s,'click',onclick);

		// set some styles here to make carousels less rude to the myBar
		var h=$D.getRegion(s);
		h=(h.bottom-h.top)+'px';
		s.parentNode.style.height=h;
		s.style.height=h;
		s.style.position='absolute';
		//s.style.overflow='auto';
		var p=$D.getElementsByClassName('scrollpages','div',s)[0];
		p.style.width=(len * this.scrollDistance * 1.0)+'px';
		p.style.position='absolute';

		// http://bug.corp.yahoo.com/show_bug.cgi?id=832779
		// figure out what page we're REALLY on (which will usually be 0), and then go there.
		// this needs to be down here, because the browser won't get the right values unless the styles and heights above are set.
		// This is the ONLY time that we manually read the scrollLeft property, since this tends to be very sluggish to read in Mozilla.
		var sl = Math.round(s.scrollLeft / this.scrollDistance);
		if(sl < 0) { sl = 0; }
		else if(sl >= this.pages.length) { sl = this.pages.length-1; }
		this.current = sl;
		this.scrollBody.scrollLeft = currentScroll= sl * this.scrollDistance;

		this.anim=new $S(this.scrollBody , this.animAttrs, this.animDur, this.easeMethod);
		this.anim.onTween.subscribe(ontween);
		this.anim.onComplete.subscribe(oncomplete);

		if( len > 1 ){
			// only add nav buttons and page indicators if more than one page
			addNavButtons(this);
			addPageIndicators(this);
			updateNavState(this);
		} else { this.navLinks=[]; }
		list=s=null;
		return true;
	};


	/**
	 * autoPlayTimeOut
	 * @private
	 * Recording the timeout ID so that it can be cleared when autoplay is stopped.
	 **/
	var autoPlayTimeOut=0;
	/**
	 * autoPlayFn {null | Function}
	 * @private
	 * @description Function that actually switches the card.  Set as a timeout by autoPlayer.
	 **/
	var autoPlayFn=function(){
		me.autoPlay= (me.autoPlayDirection>0)?me.scrollNext():me.scrollPrev();
	};
	/**
	 * autoPlaySubscribed {Boolean}
	 * True if autoPlayer has subscribed to the onPageChange event.
	 * @private
	 **/
	var autoPlaySubscribed=false;
	/**
	 * autoPlayer {Function}
	 * @private
	 * @description The autoPlay workhorse.  Sets up the proper things based on the value of this.autoPlay.
	 **/
	var autoPlayer=function() {
		clearTimeout(autoPlayTimeOut);

		// check to see if it's going to fail before it does.
		// this ends autoplay as soon as it's known that it will stop.
		if(me.autoPlay && !me.roundRobin && (me.current == me.pages.length-1 && me.autoPlayDirection > 0 || me.autoPlayDirection <= 0 && me.current === 0) ) {
			me.autoPlay = false;
		}

		if(!me.autoPlay) {
			// stop if running.  Unsubscribe.
			me.onPageChange.unsubscribe(autoPlayer);
			autoPlaySubscribed=false;
			me.onAutoPlayStop.fire(me.current);
		} else {
			/*
			1. In me.autoPlayDur seconds, call autoPlayFn
			2. This scrolls next or prev.
			3. When the scrolling is done, it triggers the onPageChange event.
			4. This calls autoPlayer.  (Goto step 1.)
			*/
			if(!autoPlaySubscribed) {
				autoPlaySubscribed=true;
				me.onPageChange.subscribe(autoPlayer);
				autoPlayFn();
			} else {
				autoPlayTimeOut=window.setTimeout(autoPlayFn,me.autoPlayDur*1000);
			}
		}
	};
	/**
	 * autoPlayStart method
	 * @description Starts the autoPlay
	 * @privileged
	 **/
	this.autoPlayStart=function() {
		if(!this.autoPlay) {
			this.onAutoPlayStart.fire(this.current);
		}
		this.autoPlay=true;
		autoPlayer();
	};
	/**
	 * autoPlayStop method
	 * @description Stops the autoPlay
	 * @privileged
	 **/
	this.autoPlayStop=function() {
		this.autoPlay=false;
		autoPlayer();
	};

	/**
	 * getData method
	 * @description Called to make an ajax call for the rest of a collection.  It expects that the data to be found at url will be a JSON string of the form [{pgIdx:<page number>, pgHtml:<html of the page>},{...},...]
	 * @param url {String} url to request
	 * @param postExecute {Function} function to call after elements have been loaded
	 * @privileged
	 **/
	this.getData = function(url,postExecute) {
		var id=this.getId();
		var me=this;
		var s = function() { me.getDataSuccess.apply(me,arguments); };
		var f = function() { me.getDataFailure.apply(me,arguments); };
		var callback = {
			success: s,
			failure: f,
			argument: {
				postExecute:postExecute
			}
		};
		var oConObj = $U.Connect.asyncRequest('GET',url,callback,null);
	};

    /**
	 * getDataSuccess method
	 * @description Called upon successful execution of ajax call
	 * @privileged
	 **/
	this.getDataSuccess = function(o) {
		if(o.responseText){
			var sText = o.responseText;
			/*
			* remove any comments that might have been added,
			* yapache shouldn't send them if the header is application/x-json,
			* but you never know
			*/
			sText = sText.replace(/<\!--.+-->/gim,'');
			// instantiate json
			var oArr = eval('(' + sText + ')');
			// loop through end of array
			if( oArr ){
				var numPages = this.pages.length;
				for(var i=oArr.length-1;i>-1;i--){
					var pg = oArr[i].pgIdx;
					var html = oArr[i].pgHtml;
					if(pg < numPages){
						this.pages[pg].innerHTML = html;		// only set inner html if page index is within bounds
					}
				}
			}

			//if a "postExecute" function is passed in, execute it.
			if (o.argument.postExecute) {
				o.argument.postExecute();
			}
		}
	};

	/**
	 * getDataFailure method
	 * @description Called when getData call returns an error
	 * @privileged
	 **/
	this.getDataFailure = function(o) {
		//console.log('in getDataFailure',o,this.getId());
		// stub func
	};

	/**
	 * An unload handler that releases all elements and breaks any circular links caused by this object.
	 * Called by the CarouselMgr on page unload.
	 * @privileged
	 **/
	this.unload = function() {
		if(!this.navLinks){this.navLinks = [];}
		this.navLinks.push(_element, this.prev, this.next, this.scrollBody, this.anim);
		for(var j=this.navLinks.length-1;j>-1;j--) {
			var a=this.navLinks[j];
			if(a) {
				a.onclick=null;
				a.onmousedown=null;
				a.onmouseup=null;
				a.carousel=null;
			}
			a=null;
			this.navLinks[j]=null;
		}
		for(var j=this.pages.length-1;j>-1;j--) {
			this.pages[j]=null;
		}
	};


	// initialize this carousel.
	if(el) { this.init(el,args); }
};

Carousel.prototype = {
	/**
	 * pageFinder { Function }
	 * Passed to Dom.getElementsBy to define what a "page" is.
	 * Defaults to getting by className of this.pageClassName
	 * @public
	 **/
	pageFinder:function(el) {
		return $D.hasClass(el,this.pageClassName);
	},
	/**
	 * pageTagName { String }
	 * Passed to Dom.getElementsBy to define what a "page" is.  This speeds up the grabbing of pages.
	 * @default 'div'
	 * @public
	 **/
	pageTagName:'div',
	/**
	 * pageClassName {String}
	 * Passed to dom.getElementsBy to define what a "page" is.  This is the className that is searched for by default.
	 * Note that if pageFinder is overwritten, then this might not have any effect.
	 * @public
	 * @default scrollpage
	 **/
	pageClassName:'scrollpage',

	/**
	 * easeMethod
	 * Easing method to be used by animation.
	 * @default YAHOO.util.Easing.easeOut
	 * @public
	 **/
	easeMethod:$U.Easing.easeOut,
	/**
	 * animAttrs
	 * @public
	 * Attributes passed to the animation object.
	 **/
	animAttrs:{
		scroll:{
			from:[0,0],
			to:[0,0]
		}
	},
	roundRobin:false,
	/**
	 * animDur
	 * duration of the animation, in seconds.
	 * @public
	 * @default 1.5 seconds
	 **/
	animDur:1.5,
	/**
	 * autoPlayDur
	 * @public
	 * The duration in seconds that autoplay should switch the card.
	 **/
	autoPlayDur:5,
	/**
	 * onScrollStart
	 * {Object CustomEvent} Event that occurs when the scrolling starts.
	 * @public
	 **/
	 onScrollStart:null,
	 /**
	  * onPageChange
	 * {Object CustomEvent} Event that occurs when the scrolling completes.
	 * @public
	 **/
	onPageChange:null,
	 /**
	  * onClick
	 * {Object CustomEvent} Event that occurs when the contents of the carousel are clicked.
	 * @public
	 **/
	onClick:null,

	/**
	 * autoPlayDirection
	 * {Number} The direction that autoPlay should cycle.  Positive for "next," negative for "prev"
	 * @public
	 * @default 1
	 **/
	autoPlayDirection:1, // set to negative for previous scrolling.
	/**
	 * onAutoPlayStart
	 * {CustomEvent} Event that fires when the autoplay starts.
	 * @public
	 **/
	onAutoPlayStart:null,
	/**
	 * onAutoPlayStop
	 * {CustomEvent} Event that fires when autoplay stops.
	 * @public
	 **/
	onAutoPlayStop:null,

	/**
	 * scrollTo Method
	 * @param index {Integer} The index of the page to scroll to.
	 * @public
	 * @description Scrolls to a given "index" (page numbers, starting with 0)  Called by scrollNext and scrollPrev.
	 **/
	scrollTo:function(index) {
		// this is an exposed function, so deal with bad arg.
		// do nothing if:
			// index is null or undefined
			// index is too big or too small (and not roundRobin)
			// index refers to the current page
		if(this.roundRobin) {
			if(index < 0) {
				index=this.pages.length-1;
			} else if(index >= this.pages.length) {
				index=0;
			}
		}
		if((!index && index !== 0) || index >= this.pages.length || index < 0 || index == this.current) {
			return false;
		}
		var me=this;

		if(this.anim.isAnimated()) {
			this.anim.stop();
		}

		this.onScrollStart.fire({to:index,from:this.current,toString:function(){return 'from:'+this.from+', to:'+this.to;}});

		// set the destination.
		var end=index * me.scrollDistance;
		me.animAttrs.scroll.from=[me.getCurrentScroll(),0];
		me.animAttrs.scroll.to=[end,0];
		me.current=index;
		updateNavState(me);

		// set the attributes each time so that we can take into consideration changes that may occur to the exposed object.
		me.anim.attributes=me.animAttrs;
		me.anim.duration = me.animDur;

		// this setTimeout makes it work properly in Firefox, by making it asynchronous.
		setTimeout(function(){me.anim.animate();},0);
		return true;
	},
	/**
	 * scrollNext Method
	 * @public
	 * @description Scrolls to the next page.
	 **/
	scrollNext : function() {
		var ret=this.scrollTo(this.current+1);
		return ret;
	},
	/**
	 * scrollNext_click Method
	 * @public
	 * @description Scrolls to the next page.  If attached to the click and mousedown events, it will handle keyboard and mouse events properly and accessibly.
	 * <p>Usage: var a=YAHOO.util.Dom.get('nextpagelink'); a.carousel=YAHOO.Media.Dtk.CarouselMgr.init('dtk-car-0'); a.onclick=a.carousel.scrollNext_click; </p>
	 **/
	scrollNext_click : clickHandler('scrollNext'),
	/**
	 * scrollNext Method
	 * @public
	 * @description Scrolls to the previous page.
	 **/
	scrollPrev : function() {
		var ret= this.scrollTo(this.current-1);
		return ret;
	},
	/**
	 * scrollPrev_click Method
	 * @public
	 * @description Scrolls to the prev page.  If attached to the click and mousedown events, it will handle keyboard and mouse events properly and accessibly.
	 * <p>Usage: var a=YAHOO.util.Dom.get('prevpagelink'); a.carousel=YAHOO.Media.Dtk.CarouselMgr.init('dtk-car-0'); a.onclick=a.carousel.scrollPrev_click; </p>
	 **/
	scrollPrev_click:clickHandler('scrollPrev'),
	/**
	 * scrollTo_click Method
	 * @public
	 * @description Scrolls to a given next page.  If attached to the click and mousedown events, it will handle keyboard and mouse events properly and accessibly.
	 * <p>Usage: var a=YAHOO.util.Dom.get('page2link'); a.index=2; a.carousel=YAHOO.Media.Dtk.CarouselMgr.init('dtk-car-0'); a.mousedown=a.onclick=a.carousel.scrollTo_click; </p>
	 **/
	scrollTo_click:clickHandler('scrollTo',function(el){return (!el.index && el.index!==0);},function(el){return el.index;}),
	/**
	* toString method
	* @return {String} string represenation of carousel obj
	*/
	toString:function(){
		var el=this.getElement();
		if(el) {
			return 'Carousel #'+el.id+' .'+el.className;
		} else {
			return 'Carousel [Not Initiated]';
		}
		el=null;
	},
	/**
	 * getId methods
	 * @public
	 * @description Returns the ID of the carousel's root element.
	 * Used by the CarouselMgr to identify individual Carousel daemons.
	 **/
	getId:function(){
		return this.getElement().id;
	}
};

})(); // end of the Carousel scope.


(function(){ // begin scope for CarouselMgr.
/**
 * CarouselMgr
 * @class Singleton for managing Carousel Widgets
 * <p>Usage: YAHOO.Media.Dtk.CarouselMgr.init("myDtkElement");</p>
 * @requires YAHOO.util.Scroll
 * @requires YAHOO.util.Dom
 * @requires YAHOO.util.Event
 * @requires Carousel
 **/
var CarouselMgr = function(){
	CarouselMgr.superclass.constructor.call(this,Carousel);
};
YAHOO.extend(CarouselMgr,DTK.util.Manager);
/**
 * Method to init all carousels that have a certain className
 * @privileged
 * @param cls { String } The className that designates a carousel element. Defaults to "dtk-carousel"
 * @param args { Object } Optional.  Arguments passed to Carousel.init()
 * @return Collection of all carousels created by this method.
 **/
CarouselMgr.prototype.initAll = function(cls,args){
	return CarouselMgr.superclass.initAll.call(this, function(){ return $D.getElementsByClassName(cls||'dtk-carousel','div',document);}, args);
};
CarouselMgr.prototype.getCarousel = CarouselMgr.prototype.getDaemonById;
CarouselMgr.prototype.idString='Carousel Manager';

DTK.CarouselMgr = new CarouselMgr();

})(); // end of the CarouselMgr scope

})();


/****************************************************************************
 *
 * showbox
 *
 */

(function(){

var $U=YAHOO.util;
var $D=$U.Dom;
var $E=$U.Event;
var DTK=YAHOO.namespace('Media.Dtk');

var zIndex=4000;

var showBox=function(div,boxCls,toggleCls){
	this.init(div,boxCls,toggleCls);
};
showBox.prototype={
	init:function(div,boxCls,toggleCls){
		if(!div){return;}
		var box = $D.getElementsByClassName(boxCls,"div",div)[0];
		this.box=box;
		this.box.hasLayout=true;
		var closers=$D.getElementsByClassName('close','span',box);
		this.closers=[];
		for(var c=closers.length-1;c>-1;c--){
			var clA=document.createElement('a');
			clA.className=closers[c].className;
			clA.innerHTML=closers[c].innerHTML;
			clA.href='#';
			this.closers.push(clA);
			closers[c].parentNode.insertBefore(clA,closers[c]);
			closers[c].parentNode.removeChild(closers[c]);
			$E.addListener(clA,'click',function(e,o){$E.stopEvent(e);o.hideNow();if(this.blur){this.blur();}},this);
		}
		$E.addListener(box,'mouseover',this.clearHide,this,true);
		//the following event will keep the menu open on click but prevents ctrl-click for a new tab
		//$E.addListener(box,'click',this.show,this,true);
		$E.addListener(box,'focus',this.show,this,true);

		$E.addListener(document.body,'mouseover',this.hide,this,true);
		$E.addListener(document.body,'click',this.hideNow,this,true);

		var lk = $D.getElementsByClassName(toggleCls,"a",div);
		for(var l=lk.length-1;l>-1;l--){
			$E.addListener(lk[l],'mouseover',DTK.util.clickFn,{s:this,f:this.show});
			$E.addListener(lk[l],'click',DTK.util.clickFn,{s:this,f:this.show});
			$E.addListener(lk[l],'mousedown',DTK.util.clickFn,{s:this,f:this.show});
		}

		div=box=null;
	},
	hideNow:function(){
		this.clearHide();
		this.box.style.display="none";
	},
	hide:function(e){
		var o=this;
		if(!this.timeOut){
			this.timeOut=window.setTimeout(function(){o.hideNow();},1000);
		}
	},
	clearHide:function(e){
		if(e){$E.stopEvent(e);}
		window.clearTimeout(this.timeOut);
		this.timeOut=0;
		return false;
	},
	show:function(e){
		if(e){$E.stopPropagation(e);}
		this.clearHide();
		this.box.style.zIndex=zIndex++;
		this.box.style.visibility="hidden";
		this.box.style.display="block";
		if( !this.box.region ){
			this.box.region = $D.getRegion(this.box);
		}
		if( this.box.region.right > $D.getViewportWidth() ){
			$D.addClass( this.box, "offscreen" );
		} else {
			$D.removeClass( this.box, "offscreen" );
		}
		this.box.style.visibility="visible";
	}
};

DTK.showBox=function(){
	var boxes=[],
	init=function(el,boxCls,toggleCls) {
		var tb=new showBox($D.get(el),boxCls||'show-box',toggleCls||'spill');
		if(tb.initDone){
			boxes.push(tb);
			return tb;
		}
		return null;
	};
	return {
		init:init, boxes:boxes
	};
}();

})();




/****************************************************************************
 *
 * togglelist
 *
 */

(function(){

// shorthand
var $U=YAHOO.util;
var $D=$U.Dom;
var $E=$U.Event;
var DTK=YAHOO.namespace('Media.Dtk');

DTK.initOverflow = function(id,tid) {
		var lnk = $D.get(id);
		if(lnk){ 
			lnk.onclick = function() {
				$D.replaceClass(this.parentNode, 'moreitems', 'hide');
				$D.replaceClass(tid, 'hide', 'show');
				return false; 
			}; 
		}
		var lnk2 = $D.get(id+"hide");
		if(lnk2){
			lnk2.onclick = function(){
				$D.replaceClass(lnk.parentNode, 'hide', 'moreitems');
				$D.replaceClass(tid, 'show', 'hide'); 
				return false;
			};
		}
};
	
DTK.toggleList = function(el,numshow,showtext,hidetext) {
	if(el.length && !el.tagName && typeof(el) != 'string') {
		for(var i=el.length-1;i>-1;i--) {
			DTK.toggleList(el[i],numshow,showtext,hidetext);
		}
		return true;
	}
	el=$D.get(el);
	if(!el){
		return false;
	}
	numshow=(!isNaN(numshow) && numshow >=0) ? numshow : 4;
	showtext=showtext||'&raquo; Show All';
	hidetext=hidetext||'Hide &laquo;';

	var open=function(e,list) {
		var lis=list.getElementsByTagName('li');
		for(var i=lis.length-1;i>-1;i--){
			lis[i].style.display='';
		}
		this.relatedElement.parentNode.style.display='';
		this.parentNode.style.display='none';
		if(e){$E.stopEvent(e);}
		return false;
	};
	var close=function(e,list) {
		var lis=list.getElementsByTagName('li');
		for(var i=lis.length-1;i>-1;i--){
			if(i<numshow){
				lis[i].style.display='';
			} else {
				lis[i].style.display='none';
			}
		}
		this.relatedElement.parentNode.style.display='';
		this.parentNode.style.display='none';
		if(e){$E.stopEvent(e);}
		return false;
	};

	var myLinks = [];

	var u=el.getElementsByTagName('ul');
	// initialize all the uls in u
	for(var i=u.length-1;i>-1;i--){
		var ui=u[i];
		var lis=ui.getElementsByTagName('li');
		if(lis.length>numshow) {
			var o=document.createElement('a'),c=document.createElement('a');
			c.href=o.href='#';
			o.innerHTML=showtext;
			c.innerHTML=hidetext;
			(c.relatedElement=o).relatedElement=c;
			$E.addListener(o,'click',open,ui,false);
			$E.addListener(c,'click',close,ui,false);
			myLinks.push(o,c);
			var lic=document.createElement('li'),lio=document.createElement('li');
			lic.className = lio.className = 'action';
			lic.appendChild(c);
			lio.appendChild(o);
			ui.appendChild(lic);
			ui.insertBefore(lio,lis[numshow]);
			close.call(c,null,ui);
		}
		ui=c=o=lic=lio=lis=null;
	}
	el=u=null;

	$E.addListener(window,'unload',function(){
		for(var i=myLinks.length-1;i>-1;i--){
			myLinks[i].relatedElement=null;
			myLinks[i]=null;
		}
	});
};

})();

})(); // end use scope (swish and spit - pun intended)
/* ******************************************************************** */





















/* **************************************************************** */
// users who have their cache setting set to "Each Time" will appreciate the lack of flickering in IE.  I know I do!
if( document.uniqueID && !window.XMLHttpRequest && document.execCommand ){
	YAHOO.util.Event.addListener(window,'load',function(){	try { document.execCommand("BackgroundImageCache", false, true); }catch(e){}});
}
/* **************************************************************** */

/* ******************************************************************** */
(function() { // begin use scope for cleanliness (commence gargle... pun intended)


// shorthand.
var $U=YAHOO.util;
var $D=$U.Dom;
var $E=$U.Event;

var DTK=YAHOO.namespace('Media.Dtk');
YAHOO.namespace('Media.Dtk.util');
var $C=DTK.util.Cookie;



/**
 * Declare Health namespace
 */
var $H=YAHOO.namespace('Health');



/**
 * Health Switcher
 * @constructor
 */

$H.PromoModule = function(oArgs){

	oArgs = oArgs || {};
	if(!oArgs.prefix && (!oArgs.menu && !oArgs.content)){ return false; }

	//user definable properties
	this.elMenu = oArgs.menu || oArgs.prefix+"-menu";
	this.elContent = oArgs.content || oArgs.prefix+"-content";
	this.sContentClass = oArgs.slideClass || "promoCard";
	this.elBtn = (typeof oArgs.button != "undefined") ? YAHOO.util.Dom.get(oArgs.button) : YAHOO.util.Dom.get(oArgs.prefix+"-btn");
	this.iInterval = oArgs.interval || 7;
	this.iFadeRate = oArgs.fadeRate || 1;
	this.bFadeOnClick = oArgs.fadeOnClick || false;
	this.aElOvf = oArgs.overflow || false;
	this.iMinHeight = oArgs.minHeight || false;
	this.sItemHtml = oArgs.itemHtml || "<div></div>";

	this.aElItems = [];
	this.iCurItem = -1;
	this.iLastItem = -1;
	this.bItemClicked = false;
	this.bCycleStopped = false;
	this.bCyclePaused = false;

	// test for opacity support, change rate if unsupported
	var opacitySupp;
	if( document.all ){ opacitySupp = document.getElementsByTagName("body")[0].style.filter; }
	else{ opacitySupp = document.getElementsByTagName("body")[0].style.opacity; }
	if( opacitySupp === undefined ){ this.iFadeRate = 0.01; }

	// test for exception of firefox mac (where scroller *always* shows when overflow:auto)
	if( navigator.userAgent.indexOf("Firefox") != -1 && navigator.userAgent.indexOf("Mac") != -1 ){ this.bFfMac = true; }
	else { this.bFfMac = false; }

	this.initPromo();

};

$H.PromoModule.prototype = {

	initPromo : function(){

		// init menu items
		var itemList = YAHOO.util.Dom.get(this.elMenu).getElementsByTagName('li');
		var len = itemList.length;
		for (var pos=0; pos<len; pos++) {

			// create obj to store dom refs for later use
			this.aElItems[pos] = {};

			// insert indicator html as first node in <li>
			itemList[pos].innerHTML = this.sItemHtml + itemList[pos].innerHTML;
			this.aElItems[pos].elMenuItem = itemList[pos].firstChild;

			// set <a> position and listener
			var itemLink = itemList[pos].getElementsByTagName('a')[0];
			itemLink.num = pos;
			YAHOO.util.Event.addListener(itemLink, 'click', this.selectItem, this);

			// null it out to avoid any possible mem leaks
			itemLink = null;
		}
		this.iTotItems = pos;

		// init content
		var itemContent = YAHOO.util.Dom.getElementsByClassName(this.sContentClass, 'div', YAHOO.util.Dom.get(this.elContent));
		len = itemContent.length;
		var menuHeight = YAHOO.util.Dom.get(this.elMenu).offsetHeight;
		var minHeight = (this.iMinHeight && this.iMinHeight > menuHeight) ? this.iMinHeight : menuHeight;
		//if minmum height arg was passed then set height for IE6, otherwise set minHeight
		if( this.iMinHeight && document.all && navigator.appVersion.charAt(0) == 6){
			this.setMinHeight = function(item){ YAHOO.util.Dom.setStyle(item, "height", minHeight+"px"); };
		} else if( this.iMinHeight ) {
			this.setMinHeight = function(item){ YAHOO.util.Dom.setStyle(item, "minHeight", minHeight+"px"); };
		}
		for (pos=0; pos<len; pos++) {

			this.aElItems[pos].elContent = itemContent[pos];

			//pause animation when user hovers over card
			YAHOO.util.Event.addListener(itemContent[pos], 'mouseover', this.pauseCycle, this);
			YAHOO.util.Event.addListener(itemContent[pos], 'mouseout', this.resumeCycle, this);

			if(this.iMinHeight){ this.setMinHeight(itemContent[pos]); }

			// next block for firefox mac overflow bug
			if( this.bFfMac && this.aElOvf[pos] ){
				var elOvf = YAHOO.util.Dom.get(this.aElOvf[pos]);
				var ovf = YAHOO.util.Dom.getStyle(elOvf, "overflow");
				if( ovf == "auto" || ovf == "scroll"){
					this.aElOvf[pos] = {ovf:ovf, el:this.aElOvf[pos]};
					YAHOO.util.Dom.setStyle(elOvf, "overflow", "hidden");
				}
			}

		}

		// add listener to button
		if(this.elBtn){ YAHOO.util.Event.addListener(this.elBtn, 'click', this.toggleCycle, this); }

		//pause animation when the window loses focus
		YAHOO.util.Event.addListener(window, 'blur', this.pauseCycle, this);
		YAHOO.util.Event.addListener(window, 'focus', this.resumeCycle, this);

		this.cycleItems();

	},

	// main function to change content
	changeItem : function(itemNum, clicked) {

		//test obj visibility to protect against cross animation bug
		if( this.aElItems[itemNum].elMenuItem.style.visibility == "visible" && this.iLastItem != -1 ){ return false; }

		if(clicked && this.bFadeOnClick === false){ this.iTmpRate = this.iFadeRate; this.iFadeRate=0.001; }

		// anim current and last selected menu item
		if(this.iLastItem!=-1){
			var oAnimOut = new YAHOO.util.Anim( this.aElItems[this.iLastItem].elMenuItem, {opacity:{to: 0}}, this.iFadeRate);
			oAnimOut.onStart.subscribe( function(){ this.getEl().parentNode.className=""; } );
			oAnimOut.onComplete.subscribe( function(){ this.getEl().style.visibility="hidden"; } );
			oAnimOut.animate();
		}
		var oAnimIn = new YAHOO.util.Anim( this.aElItems[itemNum].elMenuItem, {opacity:{to: 0.99}}, this.iFadeRate);
		oAnimIn.onStart.subscribe( function(){
			var el = this.getEl();
			var elP = el.parentNode;
			var newHeight = elP.offsetHeight;
			elP.className="selected";
			el.style.visibility="visible";

			// resize the indicator to the item height and adjust using the element's height attr (can be negative)
			var elH = parseInt( el.getAttribute("height"), 10);
			//el.removeAttribute("height");
			YAHOO.util.Dom.setStyle(el, "height", newHeight + (elH ? elH : 0) + "px");
/*
			// cycle through any children and adjust the height the same way
			for( var c=0; c < el.childNodes.length; c++ ){
				elH = parseInt( el.childNodes[c].getAttribute("height"), 10);
				YAHOO.util.Dom.setStyle(el.childNodes[c], "height", newHeight + (elH ? elH : 0) + "px");
			}
*/
		} );
		//oAnimIn.onComplete.subscribe( function(){ this.getEl().nextSibling.className="selected"; } );
		oAnimIn.animate();
		var elOvf;
		// anim current and last selected content
		if(this.iLastItem!=-1){

			var oAnimOutContent = new YAHOO.util.Anim( this.aElItems[this.iLastItem].elContent, {opacity:{to: 0}}, this.iFadeRate );

			// next block for firefox mac overflow bug
			if( this.bFfMac && this.aElOvf[this.iLastItem] ){
				elOvf = YAHOO.util.Dom.get(this.aElOvf[this.iLastItem].el);
				oAnimOutContent.onStart.subscribe( function(){
					YAHOO.util.Dom.setStyle(elOvf, 'overflow', 'hidden');
				} );
			}

			oAnimOutContent.onComplete.subscribe( function(){ this.getEl().style.visibility="hidden"; } );
			oAnimOutContent.animate();
		}

		var oAnimInContent = new YAHOO.util.Anim( this.aElItems[itemNum].elContent, {opacity:{to: 0.99}}, this.iFadeRate );
		oAnimInContent.onStart.subscribe( function(){ this.getEl().style.visibility="visible"; } );

		// next block for firefox mac overflow bug
		if( this.bFfMac && this.aElOvf[itemNum] ){
			elOvf = YAHOO.util.Dom.get(this.aElOvf[itemNum].el);
			var ovf = this.aElOvf[itemNum].ovf;
			oAnimInContent.onComplete.subscribe( function(){
				YAHOO.util.Dom.setStyle(elOvf, 'overflow', ovf);
			} );
		}

		oAnimInContent.animate();

		// set current/last to selected; set clicked flag
		this.iCurItem = this.iLastItem = itemNum;
		if(clicked){
			this.bItemClicked = true;
			this.stopCycle();
			// set focus on the switcher card, however, it won't show on browser because it will be turned off in CSS
			this.aElItems[itemNum].elContent.focus();
			if(this.bFadeOnClick === false){ this.iFadeRate = this.iTmpRate; }
		}

	},

	// called by menu item click
	selectItem : function(e,oPromo) {
		this.blur();
		YAHOO.util.Event.preventDefault(e);
		if(oPromo.iLastItem != this.num){
			oPromo.changeItem(this.num,true);
		}
	},

	// timer functions
	cycleItems : function(){

		this.stopCycle(true);
		if(this.bItemClicked){
			this.bItemClicked=false;
		} else {
			if(!this.bCyclePaused){
				if(++this.iCurItem >= this.iTotItems){ this.iCurItem=0; }
				this.changeItem(this.iCurItem,false);
			}
			this.startCycle();
		}

	},

	startCycle : function(auto){
		var f = function(self){ return function() { self.cycleItems(); }; };
		this.tCycle = setTimeout( f(this), this.iInterval*1000 );
		if(this.elBtn && !this.bCyclePaused){ this.elBtn.className = 'stop'; }
		this.bCycleStopped=false;
	},

	stopCycle : function(auto){
		if(typeof(this.tCycle)=="number"){ clearTimeout(this.tCycle); }
		if(this.elBtn && !auto){ this.elBtn.className = 'start'; }
		this.bCycleStopped=true;
	},

	pauseCycle : function(e,oPromo){
		oPromo.bCyclePaused=true;
		if(oPromo.elBtn){ oPromo.elBtn.className = 'start'; }
	},

	resumeCycle : function(e,oPromo){
		oPromo.bCyclePaused=false;
		if(oPromo.elBtn && !oPromo.bCycleStopped){ oPromo.elBtn.className = 'stop'; }
	},

	// called by button
	toggleCycle : function(e,oPromo){

		this.blur();
		YAHOO.util.Event.preventDefault(e);
		if(oPromo.bCycleStopped){
			oPromo.bItemClicked=false;
			oPromo.cycleItems();
		} else {
			oPromo.stopCycle();
		}

	}

};
// end of Switcher



/* ------------------------------------------------------------------------------------------------------ */
// sprite pre-loader.
// for best results, call YAHOO.Health.sprites.preload('my-element-id') immediately after the closing tag of the element with the sprite background.
// or, call YAHOO.Health.sprites.preloadByTagName('h2','parent-element-id');
$H.sprites={
	loaded:{},
	getBg:function(el){
		var s=$D.getStyle(el,'backgroundImage');
		if(s && s!='none') {
			s=s.replace(/^url\(["']?/,'').replace(/["']?\)$/,'');
			return s;
		}
	},
	preload:function(el){
		el=$D.get(el);
		if(!el){ return 'asdf'; }
		var bg=$H.sprites.getBg(el);
		if(bg && !$H.sprites.loaded[bg]) {
			// no need to actually append.  just loading it in JS will make it download the image now.
			var i=document.createElement('img');
			i.onload=function(){ i.onload=null; i=null; };
			i.src=bg;
			$H.sprites.loaded[bg]=true; // just keep track of this so that we don't do the same href unnecessarily.
		}
	},
	preloadBy:function(f,tag,root) {
		var els=$D.getElementsBy(f,tag,root);
		for(var i=els.length-1;i>-1;i--) {
			$H.sprites.preload(els[i]);
		}
	},
	preloadByClassName:function(cls,tag,root) {
		$H.sprites.preloadBy(function(el){return $D.hasClass(el,cls);},tag,root);
	},
	preloadByTagName:function(tag,root) {
		$H.sprites.preloadBy(function(){return true;},tag,root);
	}
};
// end sprite preloader.
/* ------------------------------------------------------------------------------------------------------ */



/* ------------------------------------------------------------------------------------------------------ */
// begin Recents scope
(function() {

	var clearData = function(e) {
		// check to see if the link is to turn off recents
		var offFlag = (this.id === 'mb-items-turnoff') ? true : false;
		var url = this.href+'&ajax=1';
		$E.stopEvent(e);
		var dataid = "mb-items-data";
		// update our display to the user
		// In IE, innerHTML is a read-only property of table, tr, and tbody elements
		var update = function(m){
			if( dataid!=="" ) {
				var c,t=$D.get(dataid);
				if(!t){ return; }
				var tbs=t.getElementsByTagName('tbody');
				for(var i=tbs.length-1;i>-1;i--){
					tbs[i].parentNode.removeChild(tbs[i]);
					tbs[i]=null;
				}
				(c=(t.appendChild(document.createElement('tbody')
					).appendChild(document.createElement('tr')
					).appendChild(document.createElement('td'))
				)).appendChild(document.createElement('em')).innerHTML=m;
				c.colspan=2;
				t=c=null;
			}
		};
		update('Deleting...');
		var callback = {
			success: function(o) {
					// display different messages for either if the user is clearing all or turning off the recents module
					if (!offFlag) { update('No recently viewed items'); }
					else { update('This module is now off'); }
				},		// stub func
			failure: function(o) { }		// stub func
		};
	
		var oConObj = $U.Connect.asyncRequest("GET", url, callback, null);
		
		return false;
	};

	var turnOn = function(e) {
		$E.stopEvent(e);
		var url = this.href+'&ajax=1';
		var status = this.parentNode;

		var update = function(m) {
				var c,t=$D.get("mb-items-data");
				if(!t){ return; }
				var tbs=t.getElementsByTagName('tbody');
				for(var i=tbs.length-1;i>-1;i--){
					tbs[i].parentNode.removeChild(tbs[i]);
					tbs[i]=null;
				}
				(c=(t.appendChild(document.createElement('tbody')
					).appendChild(document.createElement('tr')
					).appendChild(document.createElement('td'))
				)).appendChild(document.createElement('em')).innerHTML=m;
				c.colspan=2;
				t=c=null;
		};
		
		var callback = {
			success: function(o) {
				// display different messages for either if the user is clearing all or turning off the recents module
				update('This module is now on.');
			},		// stub func
			failure: function(o) {
				update('Sorry. Please refresh and try again.');
			}
		};
		var oConObj = $U.Connect.asyncRequest("GET", url, callback, null);
		
		return false;
	};
	
	var Recents = function(id) {
		this.myBarId = id || 'yh-mybar';		// defaults to id=yh-mybar
	};

	Recents.prototype.addClearHandlers = function(cls) {
		if( cls ) {
			// get clear all links and install our event handler
			var clrLinks = $D.getElementsByClassName(cls, "a", this.myBarId);
			for(var i=clrLinks.length-1; i>-1;i--) {
				$E.addListener(clrLinks[i], "click", clearData);
			}
		}
	};
	
	Recents.prototype.addTurnOnHandler = function(id) {
		if( id ) {
			$E.addListener(id, "click", turnOn);
		}
	};

	// attach object to Health namespace
	$H.Recents = new Recents('yh-mybar');

})();
// end Recents scope
/* ------------------------------------------------------------------------------------------------------ */



/* ------------------------------------------------------------------------------------------------------ */
// FieldDefault is used for default input values -- should this be moved to DTK or util scope?
$H.FieldDefault = function(){

	// private vars and functions (through closure)
	var itemInfo = [];

	var showDefault = function(e){
		if( $E.getTarget(e) ){
			e = $E.getTarget(e);
		}
		if( e.value === '' ){
			e.value = e.txt;
		}
	};

	var hideDefault = function(e){
		e = $E.getTarget(e);
		if( e.value == e.txt ){
			e.value = '';
		}
	};

	// return public functions
	return {

		initField:function(fieldRef,defaultText){

			fieldRef = $D.get(fieldRef);
			if(defaultText === '' || !fieldRef || typeof fieldRef.value === undefined) { return false; }

			fieldRef.txt = defaultText;
			showDefault(fieldRef);
			$E.addListener( fieldRef, 'blur', showDefault );
			$E.addListener( fieldRef, 'focus', hideDefault );

		}

	}; //return

}(); //FieldDefault


/* ------------------------------------------------------------------------------------------------------ */
// CheckRadio is used for the Groups page to figure out what the user selects
$H.CheckRadio = function(){

	var decideAction = function(e, searchInput){
		$E.stopEvent(e);

		var inputs = $D.getElementsBy(function(el) {return (el.type=='radio');},'input',this);

		if(inputs && inputs.length>0) {
			if (inputs[0].id == 'grps' && inputs[0].checked) {
				this.action = 'http://groups.yahoo.com/search';
				searchInput.name = 'query';
			}
			else {
				this.action = 'http://search.messages.yahoo.com/search';
				searchInput.name = 'q';
			}
		}
		this.submit();
	};

	// return public functions
	return {
		init:function(formRef, searchInputName){
			formRef = $D.get(formRef);
			searchInput = $D.get(searchInputName);
			if(!formRef) { return false; }
			$E.addListener( formRef, 'submit', decideAction, searchInput );
		}
	}; //return

}(); //CheckRadio


/* ------------------------------------------------------------------------------------------------------ */
// begin subNav scope
(function(){

	$H.subNav = function(){

		// return public functions
		return {

			init:function(elNav){

				elNav = $D.get(elNav);

				//continue only if there's overflow
				var elMenu = elNav.getElementsByTagName("ul")[0];
				var firstItem = elMenu.getElementsByTagName("li")[0];
				if( elMenu.offsetHeight < firstItem.offsetHeight*2-5 ){ return false; }

				//this function simply adds a class to the container and removes the event
				var showNav = function(e){
					$D.addClass(elNav,"open");
				};

				//open the subnav if the selected item is in the second row
				var selectedItem = $D.getElementsByClassName("selected","li",elMenu);
				if( selectedItem && $D.getY(selectedItem[0]) > $D.getY(firstItem) ){
					showNav();
				//otherwise add the hover event
				} else {
					var removeNavEvent = function(e){
						$E.removeListener(elNav,'mouseover',showNav);
					};
					$E.addListener( elNav, 'mouseover', function(){ showNav(); removeNavEvent(); } );
				}

			}

		}; //return

	}(); //subNav

})();
// end subNav scope
/* ------------------------------------------------------------------------------------------------------ */

/**
 * ImageLoader will load an array of image urls into elements w/ a given class
 * @param el { String|Element } The parent element which will be searched
 * @param className { String } The class used to search for elements under el
 * @param imgs { Array } An array of imgs to replace the src or bg image of the elements
 * @param tag { String } Optional. If loading bg images pass the element type, otherwise img by default
 * @returns True if the number of elements found matches the length of the imgs array. False on failure.
 **/
$H.ImageLoader = function(el,className,imgs,tag){
	el = YAHOO.util.Dom.get(el);
	if(el){
		tag = tag || 'img';
		var imgEls = YAHOO.util.Dom.getElementsByClassName(className,tag,el);
		var imgCt = imgEls ? imgEls.length : 0;
		if(imgCt == imgs.length){
			for( var i=0; i<imgCt ; i++ ){
				if(tag=='img'){
					imgEls[i].src = imgs[i];
				} else {
					YAHOO.util.Dom.setStyle(imgEls[i],"backgroundImage",'url('+imgs[i]+')');
				}
			}
			return true;
		}

	}
	return false;
};





/**
 * Articles functions
 */

/* for action set articles for popping up/down divs */
$H.RegionToggleOpen = function(asid) {
	// toggles an html region open/close
	var asObj = document.getElementById(asid);
	asObj.style.display = (asObj.style.display!="block") ?  "block" : "none";
};

$H.RegionClose = function(asid) {
	// closes an html region
	var asObj = document.getElementById(asid);
	asObj.style.display="none";
};




})(); // end use scope (swish and spit - pun intended)
/* ******************************************************************** */



/* CoreID functions */
YAHOO.Health.aliasDropdown = (function(){

	// yui shorthand
	var $U=YAHOO.util;
	var $D=$U.Dom;
	var $E=$U.Event;
	

	// private methods
	var updateText = function() {
		// Hide currently selected item
		// <li class="show ..."></li>
		var current = $D.getElementsByClassName('show', 'li', 'yid-update')[0];

		var newSelected = $D.getElementsByClassName('hide', 'li', 'yid-update')[0];
		$D.addClass(current, 'hide');
		
		$D.addClass(newSelected, 'show');
		current = $D.removeClass(current, 'show');
		// Show newly selected item		
		// this: <select>.value
		newSelected = $D.removeClass(newSelected, 'hide');

		var current_avatar = $D.getElementsByClassName('show', 'img', 'avatar_nick')[0];
		var newSelected_avatar = $D.getElementsByClassName('hide', 'img', 'avatar_nick')[0];
		$D.addClass(current_avatar, 'hide');
		$D.addClass(newSelected_avatar, 'show');
		current_avatar = $D.removeClass(current_avatar, 'show');
		// Show newly selected item		
		// this: <select>.value
		newSelected_avatar = $D.removeClass(newSelected_avatar, 'hide');

	};
	
	
	// return public methods
	return {
		preInit: function() {
			$D.addClass('yid-update', 'jsenabled');
		},
		
		init: function() {
			// Set appropriate style when enabled
			$D.addClass('yid-update', 'jsenabled');
			
			// Clicking on the dropdown changes the text below accordingly
			var select = $D.get('yid-aliases');
			$E.addListener(select, 'change', updateText);
		}
	};
	

})();


/* QuickRating module */
(function(){

	var $U=YAHOO.util;
	var $D=$U.Dom;
	var $E=$U.Event;

	YAHOO.namespace('YAHOO.Health');
	$R = YAHOO.Health.ratingWidget;

	var ratingWidget = function() {
		var ratingHash = [];
		var defaultMsg = "Rate this";
		var defaultStatusHTML = "Your rating is being submitted...";
		var defaultErrorMsg = "Error has occured";
		var contentType = "";
		var isFirstVote = false;
		var isPause = false;
		var isVoted = false;			

		// const - click states
		var UP = 'thumbs-up';
		var DOWN = 'thumbs-down';
		var CLICK = "click";
		var HOVER = "hover";
		var SELECTED = "selected";
		var NOTSELECTED = "not";

		var RATETAG, RATEINFO, RATESTATUS = null; // locally global for keeping track of the rating info and status div's

		// TODO: delete this
		function init(id, root, cls) {
			//looks for all the rating widgets and attach listeners
			if (!ratingHash[id]) {
				var container = YAHOO.util.Dom.get(id);
				var thumbLinks = YAHOO.util.Dom.getElementsByClassName("rate","a",container);
				for (var x=0;x<thumbLinks.length;x++) {
					YAHOO.util.Event.addListener(thumbLinks[x], "click", handleVote, container);
				}
				ratingHash[id] = container;
			}
		}

		var initAll = function(root, cls, first, voted, content_type) {
			cls=cls||'rating';
			content_type=content_type||'article';
			contentType = content_type;
			isFirstVote = first||false;
			isVoted = voted||false;
			// turn off voting if the user has voted
			if (isVoted) {isPause = true;}
			
			root=$D.get(root);
			if (!root) { return false; } // break, exit if the form doesn't exist

			RATETAG = $D.get('rate-tag');
			RATEINFO = $D.get('rate-info');
			RATESTATUS = $D.get('rate-status');

			// if JS is enable, it will add an addition class to the form which hides unnecessary elements
			$D.addClass(root, 'jsenable');

			var finder=function(el) {
				return (el.type=='radio' && $D.hasClass(el,cls));
			};
			var inputs = $D.getElementsBy(finder,'input',root);

			if(inputs && inputs.length>0) {
				// has quickrate inputs.
				var il=inputs.length;
				for(var i=0;i<il;i++) {
					var input=inputs[i];

					var name=input.name;

					var div=document.createElement('div');
					var a=document.createElement('a');

					a.href='#';
					a.name=input.name;
					a.title=input.title;
					a.id=input.id;

					if (input.id == UP) {
						div.id = 'up';
					} else {
						div.id = 'down';
					}

					// attach handlers to link
					a.className = CLICK; // set the clickable state on the actions
					a.onclick = clickHandler;
					a.onmouseover = hoverHandler;
					a.onmouseout = unHoverHandler;

					div.appendChild(a);
					$D.get(root).appendChild(div);
					input.parentNode.removeChild(input);
				}
			}
		};

		var clickHandler = function() {
			// retrieve event and element from the this keyword - fix for Safari
			var e = $E.getEvent(this);
			var el = this;

			$E.stopEvent(e);
			if (!isPause) {
				RATETAG.innerHTML = "Thank you...";
				RATEINFO.style.display = "none";				
				// manually inserts default status message via JS so it would be hidden if CSS is turned off on browser
				RATESTATUS.innerHTML = defaultStatusHTML;
				RATESTATUS.style.display = "block";

				if (el.id == UP) {
					el.className = SELECTED;
					$D.get('down').childNodes[0].className = NOTSELECTED;
				} else {
					el.className = SELECTED;
					$D.get('up').childNodes[0].className = NOTSELECTED;
				}

				vote(e,el);
				isPause = true; // pause the module so that no click handlers will be procesed
			}
			return false;
		};

		var hoverHandler = function() {
			// alert(this);
			var el = this;
			if (!isPause) {
				if (!isVoted) {
					if (el.id == UP) {
						RATETAG.innerHTML = "Recommend!";
					} else {
						RATETAG.innerHTML = "Not helpful!";
					}
					$D.replaceClass(el,"click","hover");
					el.className = HOVER;
				} 
			}
			return true;
		};

		var unHoverHandler = function(e) {
			var el = this;
			if (!isPause) {
				if (!isFirstVote) { 
					RATETAG.innerHTML = defaultMsg + " " + contentType + ":";
					el.className = "click";
				} else {
					RATETAG.innerHTML = "Be the first to rate!";
					el.className = "click";
				}
			}
		};

		var vote = function(e,el) {
			var callback = {
				success: rateSuccess,
				failure: rateError,
				argument: el
			};

			if (!isPause) {
				var f = el.parentNode.parentNode;
				var url = f.action;

				var data = (el.id == UP) ? ['ajax=1','overall=yes'] : ['ajax=1','overall=no'];

				for(var i=f.length-1;i>-1;i--) {
					if(f[i].name) {
						data.push( ([escape(f[i].name),escape(f[i].value)]).join('=') );
					}
				}
				data = data.join('&');
				url += (url.indexOf('?')==-1 ? '?' : '&') + 'random=' + Math.random();
				if(f.method.toLowerCase()!='post') {
					url += '&' + data;
					data = null;
				}

				var oConObj = YAHOO.util.Connect.asyncRequest('GET',url,callback,null);
			}
			$E.stopEvent(e);
		};

		function rateError(o) {
			RATESTATUS.innerHTML = defaultErrorMsg;
		}

		function rateSuccess(o) {
			if (o.responseText !== '') {
				// no updating raw results
				// RATEINFO.innerHTML = o.responseText;
				RATETAG.innerHTML = "Thank you!";
				RATESTATUS.innerHTML = "Your rating was submitted.";
				// RATEINFO.style.display = "block";
			} else {
				RATESTATUS.innerHTML = defaultErrorMsg;
			}
		}

		return {
			init: function(root, cls, first, voted, content_type) {
				initAll(root, cls, first, voted, content_type);
			}
		};
	};

	YAHOO.Health.ratingWidget = new ratingWidget();
})(); // end scope.

/* Experts Hub Page Collapsing Divs Scope */
(function() {
	var $D = YAHOO.util.Dom;
	var $E = YAHOO.util.Event;
	var H = YAHOO.namespace('Health.Blogs');
	
	H.preInit = function(category) {
		var posts = $D.getElementsByClassName('multiple', 'div', category);
		$D.addClass(posts, 'jsenabled');
	};
	
	H.init = function() {
		var allExperts = $D.getElementsByClassName('expert', 'div', 'yh-blogs-hub');

		// Loop through all the div for each expert
		for (var i = 0; i < allExperts.length; i++) {
			var expert = allExperts[i];
			
			// Add the link text and attach the event to it
			var link = document.createElement('a');
			link.href = '#';
			link.className = 'toggler';
			link.innerHTML = '<span class="aro"><!-- --></span> <span class="copy">Show More Experts</span>';
			expert.getElementsByTagName('h2')[0].parentNode.appendChild(link);
			
			var toggler = $D.getElementsByClassName('title', 'div', expert);
			$E.addListener(toggler, 'click',
				function(e, obj) {
					H.toggleBlog(obj);
					$E.preventDefault(e);
				},
				expert,
				true
			);
		}
	};

	H.toggleBlog = function(expert) {	
		var newHeight = 0;
		var unit = 'px';
		var collapsible = $D.getElementsByClassName('multiple', 'div', expert)[0];
		var link = $D.getElementsByClassName('toggler', 'a', expert)[0];
		var linkText = $D.getElementsByClassName('copy', 'span', link)[0];
		
		// If the div is collapsed
		if ($D.hasClass(expert, 'close')) {
			//newHeight = parseFloat(collapsible.origHeight);
			newHeight = 100;
			unit = '%';
			
			$D.replaceClass(expert, 'close', 'open');
			linkText.innerHTML = 'Hide Experts';
		
		// If div is opened
		} else {
			$D.replaceClass(expert, 'open', 'close');
			linkText.innerHTML = 'Show More Experts';
		}

		
		var anim = new YAHOO.util.Anim(collapsible, { height: {to: newHeight, unit:unit} }, 0.3, YAHOO.util.Easing.easeOut);
		anim.animate();
	};

	YAHOO.util.Event.onContentReady('yh-blogs-hub', YAHOO.Health.Blogs.init);
})();


/* Article tools [email] [print] [im] */
(function() {	// begin anonymous function


YAHOO.namespace('Media.Dtk.ArticleTools');


YAHOO.Media.Dtk.ArticleTools.Email = new function() {
	/**
	 * private variables
	 */
	
	/**
	 * / .. /  - defines the start and end of the regex.
	 * ^       - start at the beginning of the email value
	 * \w+     - and check for one or more (+) alphanumeric chars (\w)
	 * As a group (....)
	 * [\.-]?  - check for a period (\.) or a '-', 0 or 1 time (?) 
	 * \w+     - followed by one or more (+) alphanumeric chars (\w)
	 * (...)*  - Now check that this group occurs 0 or more times (*)
	 * @       - '@' must occur next.
	 * The rest you can figure out for yourself with the exception of...
	 * \w{2,3} - 2 or 3 alphanumeric chars.
	 * $       - end of the email value 
	 */
	//var emailRegEx = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
	// http://data.iana.org/TLD/tlds-alpha-by-domain.txt
	var emailRegEx = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(aero|arpa|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel))$/;
	
	function trim(txt) {
		return txt.replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"); 
	}

	function isValidEmail(s) {
		s = trim(s);
		if (s && !emailRegEx.test(s)) { return false; }
		return true;
	}
	
	/**
	 * returned properties/methods
	 */

	return {
	
		isValidEmail : isValidEmail,			// expose to public
		
		checkEmails : function(idTo, idFrom) {
			var isOk = true;

			// check TO emails
			var emails = trim(YAHOO.util.Dom.get(idTo).value.replace(/;/g, ","));		// replace all ; chars as , (normalize to , separator)
			if( emails === "" ) {
				isOk = false;
			} else {
				emails = emails.split(",");												// split all at , char

				for(var i=0; i<emails.length; i++) {
					if (!isValidEmail(emails[i])) {
						isOk = false;
						break;			// we have at least one error; no need to continue in loop
					}
				}
			}
				
			if( !isOk ){
				YAHOO.util.Dom.get('dtk-err-to').innerHTML = "There is a problem with one or more email addresses entered";
			} else {
				YAHOO.util.Dom.get('dtk-err-to').innerHTML = "";
			}
			

			// check FROM email
			
			var from = trim(YAHOO.util.Dom.get(idFrom).value);
			if( (from === "") || !isValidEmail(from) ){
				YAHOO.util.Dom.get('dtk-err-from').innerHTML = "There is a problem with the email address entered";
				isOk = false;
			} else {
				YAHOO.util.Dom.get('dtk-err-from').innerHTML = "";
			}
			
			return isOk;
		},
		
		// address book popup
		addressBook : function() {
			// documentation: http://devel.yahoo.com/yahoo/properties/addressbook2/doc/insert.html
			
			document.domain = "yahoo.com";		// currently necessary for address book due to a bug (see jeremy johnstone)
			
			var myPropertyName = "health";
			//var addURL = "http://address.yahoo.com/?v=EO&A=e&VPC=kiosk&.done=http%3A%2F%2Fknowpotserve-df.santamonica.corp.yahoo.com%3A1080%2Fdtk%2Farticletools%2FemailKioskAdd.html&yprop=" + myPropertyName;
			//var addURL = "http://address.yahoo.com/?v=EO&A=e&VPC=kiosk&yprop=" + myPropertyName;
			var addURL = "http://mix200.address.yahoo.com/?A=e&VPC=kiosk&yprop=" + myPropertyName;
			addRemote=window.open(addURL, "AddressBook", "width=480,height=480,resizable=yes,scrollbars=yes,toolbar=no,status=0");
			if( addRemote != null ){
				if( addRemote.opener == null ) { addRemote.opener = self; }
			}
			addRemote.focus();
			
			return addRemote;
		}
		
	};
	
}();



YAHOO.Media.Dtk.ArticleTools.IM = new function() {
	/**
	 * private variables
	 */
	var imMsg = "Check out this story on Yahoo!:";		// default lead-in message
	var msgr_installed;
	var msgr_version = "";
	var msgr_platform = "";
	

	/**
	 * private functions
	 */
	 
	function init(imMsgAlt) {
		if(imMsgAlt){ imMsg = imMsgAlt; }
		
		var w, v;
		if(document.all) {
			v = document.all.not_Ymsgr;
		} else {
			v = document.getElementById("not_Ymsgr");
		}
	
		if (v) {
			// gecko detection.
			w = document.getElementById("Ymsgr");
			if (w && w.offsetHeight) {
				msgr_installed=1;
				msgr_version="5";
				msgr_platform="w32";
			} else {
				//msgr_installed=0;
			
				//FOR NOW JUST LET IT ASSUME ITS INSTALLED
				msgr_installed=1;
			}
		} else {
			msgr_installed=1;
			msgr_version="5";
			msgr_platform="w32";
		}

		// see if the plugin is there
		if (navigator.mimeTypes && navigator.mimeTypes.length) {
			for (var i=0; i<navigator.mimeTypes.length; i++) {
				if (navigator.mimeTypes[i].suffixes.indexOf("yps") > -1) {
					msgr_installed=1;
					msgr_version="";
					msgr_platform="";
					break;
				}
			}
		}
	}

	
	/**
	 * initialization: run detection upon singleton creation
	 */
	init();

	
	/**
	 * returned properties/methods
	 */

	return {
	
		// plug an onload handler
		init : init,

		
		hasMsgr : function() {
			var a = document.cookie;
			var b = a.split("; ");
			for (var c = 0; c<b.length; c++) {
				var d = b[c].indexOf("=");
				var e = b[c].substring(0, d);
				var f = b[c].substring(d + 1);
				if (e == "C") {
					alert(f);
					var g = f.split("& ");
					for (h = 0; h < g.length; h++) {
						var i = g[h].indexOf("=");
						var j = g[h].substring(0, i);
						var k = g[h].substring(i + 1);
						if (j == "mg" && k == "1"){ return true; }
					}
				}
			}
			return false;
		},

		
		setIntroMsg : function(s) {
			if(s){ imMsg = s; }
		},
		
		
		imStory : function(hdline, lnk) {
			if( msgr_installed ) {
				// user has messenger installed -
				// open an im window to a user
				location.href = "ymsgr:im?msg=" + imMsg + "+" + hdline + "+" + lnk;
			} else {
				// user does not have messenger installed - 
				// so go to messenger to download it
				if( confirm("You do not appear to have Yahoo! Messenger installed. Would you like to install it now?") ) {
					location.href = "http://messenger.yahoo.com";
				}
			}
			return false;
		}
		
	};
}();



YAHOO.Media.Dtk.ArticleTools.Print = new function() {
	/**
	 * private variables
	 */
	
	// all this "configurable" code tend to bloat the javascript
	// we may wish to lessen some non-essential flexibility to reduce some lines of code
	
	var sRootNodeId = "";							// dom id for article content root node (usually the container id)
	var sTextClass = "dtk-art-text";				// class to mark text content
	var sTextClassTag = "div";						// tag to mark text content
	var sImageClass = "dtk-art-image";				// class to mark image content
	var sImageClassTag = "div";						// tag to mark image content
	var sAdClass = "dtk-art-ad";					// class to mark ad content
	var sAdClassTag = "div";						// tag to mark ad content
	var sCommentClass = "dtk-art-comment";			// class to mark comment content
	var sCommentClassTag = "div";					// tag to mark comment content
	var sHideClass = "dtk-art-print-hide";			// class to add to hide content elements
	
	var sTextCtrlId = "dtk-print-text";				// id of Hide Text checkbox
	var sImageCtrlId = "dtk-print-images";			// id of Hide Images checkbox
	var sAdCtrlId = "dtk-print-ads";				// id of Hide Ads checkbox
	var sCommentCtrlId = "dtk-print-comments";		// id of Hide Comments checkbox
	var sSendPrinterCtrlId = "dtk-print-send";		// id of Send to Printer button
	
	var aTextNodes;			// array of text nodes to hide
	var aImageNodes;		// array of image nodes to hide
	var aAdNodes;			// array of ad nodes to hide
	var aCommentNodes;		// array of comment nodes to hide

	
	/**
	 * private functions
	 */
	
	function togglePrint(arNodes, bVisible) {
		if(bVisible) { 
			YAHOO.util.Dom.removeClass(arNodes, sHideClass);
		} else {
			YAHOO.util.Dom.addClass(arNodes, sHideClass);
		}
	}

	/* event handlers */
	
	function onToggleText(e, o) 	{ if(aTextNodes) { togglePrint(aTextNodes, o.checked); } }
	function onToggleImages(e, o) 	{ if(aImageNodes) { togglePrint(aImageNodes, o.checked); } }
	function onToggleAds(e, o) 		{ if(aAdNodes) { togglePrint(aAdNodes, o.checked); } }
	function onToggleComments(e, o) { if(aCommentNodes) { togglePrint(aCommentNodes, o.checked); } }

	function onSendPrinter(e, o) {
		window.focus();
		window.print();
	}
	
	function addListeners() {
		// add toggle handlers
		
		var ctrl = YAHOO.util.Dom.get(sTextCtrlId);
		if(ctrl) { YAHOO.util.Event.addListener(ctrl, 'click', onToggleText, ctrl, true); }
		
		ctrl = YAHOO.util.Dom.get(sImageCtrlId);
		if(ctrl) { YAHOO.util.Event.addListener(ctrl, 'click', onToggleImages, ctrl, true); }
		
		ctrl = YAHOO.util.Dom.get(sAdCtrlId);
		if(ctrl) { YAHOO.util.Event.addListener(ctrl, 'click', onToggleAds, ctrl, true); }
		
		ctrl = YAHOO.util.Dom.get(sCommentCtrlId);
		if(ctrl) { YAHOO.util.Event.addListener(ctrl, 'click', onToggleComments, ctrl, true); }

		// add send to printer handler
		
		ctrl = YAHOO.util.Dom.get(sSendPrinterCtrlId);
		if(ctrl) { YAHOO.util.Event.addListener(ctrl, 'click', onSendPrinter, ctrl, true); }
	}
	

	/**
	 * returned properties/methods
	 */
	
	return {
	
		init : function(oArgs) {
			// all this "configurable" code tend to bloat the javascript
			// we may wish to lessen some non-essential flexibility to reduce some lines of code

			// init our node arrays of elements to hide
			aTextNodes = YAHOO.util.Dom.getElementsByClassName(sTextClass, sTextClassTag);
			aImageNodes = YAHOO.util.Dom.getElementsByClassName(sImageClass, sImageClassTag);
			aAdNodes = YAHOO.util.Dom.getElementsByClassName(sAdClass, sAdClassTag);
			aCommentNodes = YAHOO.util.Dom.getElementsByClassName(sCommentClass, sCommentClassTag);

			if( oArgs ) {
				// allow overriding of default options
				sRootNodeId = oArgs.rootNode || sRootNodeId;
				sTextClass = oArgs.textClass || sTextClass;
				sTextClassTag = oArgs.textClassTag || sTextClassTag;
				sImageClass = oArgs.imageClass || sImageClass;
				sImageClassTag = oArgs.imageClassTag || sImageClassTag;
				sAdClass = oArgs.adClass || sAdClass;
				sAdClassTag = oArgs.adClassTag || sAdClassTag;
				sCommentClass = oArgs.commentClass || sCommentClass;
				sCommentClassTag = oArgs.commentClassTag || sCommentClassTag;
				sHideClass = oArgs.hideClass || sHideClass;
				
				// allow overriding ids of the print controls
				sTextCtrlId = oArgs.hideTextCtrl || sTextCtrlId;
				sImageCtrlId = oArgs.hideImageCtrl || sImageCtrlId;
				sAdCtrlId = oArgs.hideAdCtrl || sAdCtrlId;
				sCommentCtrlId = oArgs.hideCommentCtrl || sCommentCtrlId;
				sSendPrinterCtrlId = oArgs.sendPrinterCtrl || sSendPrinterCtrlId;

				// allow overriding of asset nodes
				aTextNodes = oArgs.aTextNodes || aTextNodes;
				aImageNodes = oArgs.aImageNodes || aImageNodes;
				aAdNodes = oArgs.aAdNodes || aAdNodes;
				aCommentNodes = oArgs.aCommentNodes || aCommentNodes;
			}
			
			// add event handlers at init complete
			addListeners();
		}
		
	};

}();


})();	// end anonymous function

YAHOO.Media.Dtk.ArticleTools.hoverMoreOn = function(){
       var el = this;
       el.className = "on";
}
YAHOO.Media.Dtk.ArticleTools.unhoverMoreOn = function(){
       var el = this;
       el.className = "off";
}

YAHOO.Media.Dtk.ArticleTools.switchMoreOnBg = function(){
	if(document.getElementById('yh-moreon') != null)
	{
		var arr_ul = document.getElementById('yh-moreon').getElementsByTagName('ul');
		for(var i=0;i<arr_ul.length;i++)
		{
			if((arr_ul[i].className == 'off'))
			{
				arr_ul[i].onmouseover = YAHOO.Media.Dtk.ArticleTools.hoverMoreOn;
				arr_ul[i].onmouseout = YAHOO.Media.Dtk.ArticleTools.unhoverMoreOn;
			}
		}
	}
}

YAHOO.util.Event.addListener(window, "load", YAHOO.Media.Dtk.ArticleTools.switchMoreOnBg);


YAHOO.Health.WaterfrontAd = new function (){
	this.adLoaded = false;
	this.resetFlag = function() {
		this.adLoaded = true;
	}
	
	this.hidecontainer = function (){
		if(!this.adLoaded){
			var wfEl = document.getElementById('yh-wf');
			if(wfEl != null)
			{
				wfEl.style.display='none';
			}
		}
	}
	
	this.init = function(){
		setTimeout("YAHOO.Health.WaterfrontAd.hidecontainer()", 3000);
	}
}

YAHOO.util.Event.addListener(window, "load", YAHOO.Health.WaterfrontAd.init);

(function(){var c=null;var d="2.5.2";var h="http://yui.yahooapis.com/";var l="undefined";function b(){return((l==typeof YAHOO||l==typeof YAHOO.env||l==typeof YAHOO.env.modules||l==typeof YAHOO.env.modules.yahoo||l==typeof YAHOO.env.modules.yahoo.version)||(parseFloat(YAHOO.env.modules.yahoo.version)<2.4))}var k=[[h+d+"/build/yuiloader-dom-event/yuiloader-dom-event.js",function(){return(l!==typeof YAHOO&&l!==typeof YAHOO.util&&l!==typeof YAHOO.util.Event&&l!==typeof YAHOO.util.Dom&&l!==typeof YAHOO.util.Get)}],["http://a.l.yimg.com/a/lib/s5/richassist_200910151321.js",function(){return(l!==typeof YAHOO.Search&&l!==typeof YAHOO.Search.RichAssist||b())}],["http://l.yimg.com/a/lib/uh/15/js/uh_utils_rsa-1.0.5.js",function(){return(l!=typeof YAHOO.one&&l!=typeof YAHOO.one.uh&&l!=typeof YAHOO.one.uh.Header)}]];var j=[[h+d+"/build/yahoo/yahoo-min.js",function(){return(l!==typeof YAHOO&&l!==typeof YAHOO.util)}],[h+d+"/build/dom/dom-min.js",function(){return(l!==typeof YAHOO.util.Dom)}],[h+d+"/build/event/event-min.js",function(){return(l!==typeof YAHOO.util.Event)}],[h+d+"/build/get/get-min.js",function(){return(l!==typeof YAHOO.util.Get||!(l!==typeof YAHOO.env&&l!==typeof YAHOO.env.ua&&l!==typeof YAHOO.lang))}],["http://a.l.yimg.com/a/lib/s5/richassist_200910151321.js",function(){return((l!==typeof YAHOO.Search&&l!==typeof YAHOO.Search.RichAssist)||!(l!==typeof YAHOO.util.Get)||b())}],["http://l.yimg.com/a/lib/uh/15/js/uh_utils_rsa-1.0.5.js",function(){return(l!=typeof YAHOO.one&&l!=typeof YAHOO.one.uh&&l!=typeof YAHOO.one.uh.Header)}]];var i=function(){if(typeof document!==l){return document}else{if(typeof document.documentElement!==l){return document.documentElement}}};var m=function(){return{addListener:function(r,s,q,p){var o=function(t){p.tempFn=q;p.tempFn(t)};if(r.addEventListener){r.addEventListener(s,o,false)}else{if(r.attachEvent){r.attachEvent("on"+s,o)}else{if(!r["on"+s]){r["on"+s]=o}}}},preventDefault:function(o){if(o.preventDefault){o.preventDefault()}o.returnValue=false},getTarget:function(p){var o=p.target||p.srcElement;if(o&&3==o.nodeType){return o.parentNode}else{return o}}}}();var a=function(t){var r=i().getElementsByTagName("head")[0];var o=r.getElementsByTagName("script");var s=false;for(var q=0;q<o.length;q++){if(1==o[q].nodeType&&t==o[q].getAttribute("src")){s=true;break}}if(!s){var p=i().createElement("script");p.setAttribute("type","text/javascript");p.setAttribute("src",t);r.appendChild(p)}};var e=function(o,u,r,q,t){var s=0;var p=function(){var v=true;for(var w=0;w<o.length;w++){if(!o[w][1]()){v=false}}return v};(function(){var v=this;if(p()){t.tempFn=u;t.tempFn();t.tempFn=null}else{for(var w=0;w<o.length;w++){if(!o[w][1]()){a(o[w][0])}}if(s<=q){if(c){clearTimeout(c);c=null}c=setTimeout(arguments.callee,500);s+=500}else{t.tempFn=r;t.tempFn();t.tempFn=null}}})()};var g=function(o,q){var p=new RegExp("(?:^|\\s+)"+q+"(?:\\s+|$)");return p.test(o.className)};var f=function(q){var t=null;try{if("keydown"==q.type){t=window.event?q.keyCode:q.which}if("click"==q.type&&g(m.getTarget(q),"stop_nav")){m.preventDefault(q)}if("keydown"==q.type&&13==t&&g(m.getTarget(q),"stop_key_nav")){m.preventDefault(q)}}catch(s){}try{if(i().createEventObject){q=i().createEventObject(q)}}catch(s){}var p=function(){var v=m.getTarget(q);if(v&&g(v,"stop_nav")){window.location=v.href}};var u=function(){if(c){clearTimeout(c);c=null}if("load"!=q.type){YAHOO.one.uh.Header.init(q)}};var o=function(v){if(v.length>0){return function(){e([v[0]],o(v.slice(1)),p,1000,this)}}else{return u}};var r=null;if(l!==typeof ygmaGetUtils){r=ygmaGetUtils()}if(r){e([r[0]],o(r.slice(1)),p,3000,this)}else{if(l==typeof YAHOO){e([k[0]],o(k.slice(1)),p,3000,this)}else{e([j[0]],o(j.slice(1)),p,3000,this)}}};var n=function(){var o=navigator.userAgent.match(/MSIE\s([^;]*)/);if(o&&o[1]){if(parseInt(o[1],10)<6){return}}var q=i().getElementById("ygma");m.addListener(q,"mouseover",f,this,true);m.addListener(q,"click",f,this,true);m.addListener(q,"keydown",f,this,true);var p=function(r){try{if(i().createEventObject){var r=i().createEventObject(r)}}catch(s){}setTimeout(function(){f(r)},1)};m.addListener(window,"load",p,this,true)};if(typeof YAHOO!==l&&YAHOO&&typeof YAHOO.util!==l&&typeof YAHOO.util.Event!==l&&typeof YAHOO.util.Get!==l&&typeof YAHOO.Search!==l&&YAHOO.util.Event.onContentReady){YAHOO.util.Event.onContentReady("ygma",n)}else{(function(){if(i().getElementById("ygma")){if(c){clearTimeout(c);c=null}n()}else{c=setTimeout(arguments.callee,500)}})()}})();

