YAHOO.util.Attribute=function(b,a){if(a){this.owner=a;
this.configure(b,true)
}};
YAHOO.util.Attribute.prototype={name:undefined,value:null,owner:null,readOnly:false,writeOnce:false,_initialConfig:null,_written:false,method:null,validator:null,getValue:function(){return this.value
},setValue:function(b,f){var c;
var a=this.owner;
var e=this.name;
var d={type:e,prevValue:this.getValue(),newValue:b};
if(this.readOnly||(this.writeOnce&&this._written)){return false
}if(this.validator&&!this.validator.call(a,b)){return false
}if(!f){c=a.fireBeforeChangeEvent(d);
if(c===false){return false
}}if(this.method){this.method.call(a,b)
}this.value=b;
this._written=true;
d.type=e;
if(!f){this.owner.fireChangeEvent(d)
}return true
},configure:function(c,b){c=c||{};
this._written=false;
this._initialConfig=this._initialConfig||{};
for(var a in c){if(a&&YAHOO.lang.hasOwnProperty(c,a)){this[a]=c[a];
if(b){this._initialConfig[a]=c[a]
}}}},resetValue:function(){return this.setValue(this._initialConfig.value)
},resetConfig:function(){this.configure(this._initialConfig)
},refresh:function(a){this.setValue(this.value,a)
}};
(function(){var a=YAHOO.util.Lang;
YAHOO.util.AttributeProvider=function(){};
YAHOO.util.AttributeProvider.prototype={_configs:null,get:function(b){this._configs=this._configs||{};
var c=this._configs[b];
if(!c){return undefined
}return c.value
},set:function(c,b,e){this._configs=this._configs||{};
var d=this._configs[c];
if(!d){return false
}return d.setValue(b,e)
},getAttributeKeys:function(){this._configs=this._configs;
var b=[];
var d;
for(var c in this._configs){d=this._configs[c];
if(a.hasOwnProperty(this._configs,c)&&!a.isUndefined(d)){b[b.length]=c
}}return b
},setAttributes:function(b,d){for(var c in b){if(a.hasOwnProperty(b,c)){this.set(c,b[c],d)
}}},resetValue:function(b,c){this._configs=this._configs||{};
if(this._configs[b]){this.set(b,this._configs[b]._initialConfig.value,c);
return true
}return false
},refresh:function(b,d){this._configs=this._configs;
b=((a.isString(b))?[b]:b)||this.getAttributeKeys();
for(var c=0,e=b.length;
c<e;
++c){if(this._configs[b[c]]&&!a.isUndefined(this._configs[b[c]].value)&&!a.isNull(this._configs[b[c]].value)){this._configs[b[c]].refresh(d)
}}},register:function(c,b){this.setAttributeConfig(c,b)
},getAttributeConfig:function(c){this._configs=this._configs||{};
var d=this._configs[c]||{};
var b={};
for(c in d){if(a.hasOwnProperty(d,c)){b[c]=d[c]
}}return b
},setAttributeConfig:function(d,c,b){this._configs=this._configs||{};
c=c||{};
if(!this._configs[d]){c.name=d;
this._configs[d]=this.createAttribute(c)
}else{this._configs[d].configure(c,b)
}},configureAttribute:function(d,c,b){this.setAttributeConfig(d,c,b)
},resetAttributeConfig:function(b){this._configs=this._configs||{};
this._configs[b].resetConfig()
},subscribe:function(c,b){this._events=this._events||{};
if(!(c in this._events)){this._events[c]=this.createEvent(c)
}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)
},on:function(){this.subscribe.apply(this,arguments)
},addListener:function(){this.subscribe.apply(this,arguments)
},fireBeforeChangeEvent:function(b){var c="before";
c+=b.type.charAt(0).toUpperCase()+b.type.substr(1)+"Change";
b.type=c;
return this.fireEvent(b.type,b)
},fireChangeEvent:function(b){b.type+="Change";
return this.fireEvent(b.type,b)
},createAttribute:function(b){return new YAHOO.util.Attribute(b,this)
}};
YAHOO.augment(YAHOO.util.AttributeProvider,YAHOO.util.EventProvider)
})();
(function(){var d=YAHOO.util.Dom,b=YAHOO.util.AttributeProvider;
YAHOO.util.Element=function(h,g){if(arguments.length){this.init(h,g)
}};
YAHOO.util.Element.prototype={DOM_EVENTS:null,appendChild:function(g){g=g.get?g.get("element"):g;
this.get("element").appendChild(g)
},getElementsByTagName:function(g){return this.get("element").getElementsByTagName(g)
},hasChildNodes:function(){return this.get("element").hasChildNodes()
},insertBefore:function(h,g){h=h.get?h.get("element"):h;
g=(g&&g.get)?g.get("element"):g;
this.get("element").insertBefore(h,g)
},removeChild:function(g){g=g.get?g.get("element"):g;
this.get("element").removeChild(g);
return true
},replaceChild:function(h,g){h=h.get?h.get("element"):h;
g=g.get?g.get("element"):g;
return this.get("element").replaceChild(h,g)
},initAttributes:function(g){},addListener:function(h,i,g,j){var k=this.get("element");
j=j||this;
k=this.get("id")||k;
var l=this;
if(!this._events[h]){if(this.DOM_EVENTS[h]){YAHOO.util.Event.addListener(k,h,function(m){if(m.srcElement&&!m.target){m.target=m.srcElement
}l.fireEvent(h,m)
},g,j)
}this.createEvent(h,this)
}YAHOO.util.EventProvider.prototype.subscribe.apply(this,arguments)
},on:function(){this.addListener.apply(this,arguments)
},subscribe:function(){this.addListener.apply(this,arguments)
},removeListener:function(g,h){this.unsubscribe.apply(this,arguments)
},addClass:function(g){d.addClass(this.get("element"),g)
},getElementsByClassName:function(g,h){return d.getElementsByClassName(g,h,this.get("element"))
},hasClass:function(g){return d.hasClass(this.get("element"),g)
},removeClass:function(g){return d.removeClass(this.get("element"),g)
},replaceClass:function(g,h){return d.replaceClass(this.get("element"),g,h)
},setStyle:function(g,h){var i=this.get("element");
if(!i){return this._queue[this._queue.length]=["setStyle",arguments]
}return d.setStyle(i,g,h)
},getStyle:function(g){return d.getStyle(this.get("element"),g)
},fireQueue:function(){var h=this._queue;
for(var g=0,i=h.length;
g<i;
++g){this[h[g][0]].apply(this,h[g][1])
}},appendTo:function(h,g){h=(h.get)?h.get("element"):d.get(h);
this.fireEvent("beforeAppendTo",{type:"beforeAppendTo",target:h});
g=(g&&g.get)?g.get("element"):d.get(g);
var i=this.get("element");
if(!i){return false
}if(!h){return false
}if(i.parent!=h){if(g){h.insertBefore(i,g)
}else{h.appendChild(i)
}}this.fireEvent("appendTo",{type:"appendTo",target:h})
},get:function(i){var g=this._configs||{};
var h=g.element;
if(h&&!g[i]&&!YAHOO.lang.isUndefined(h.value[i])){return h.value[i]
}return b.prototype.get.call(this,i)
},setAttributes:function(g,k){var h=this.get("element");
for(var i in g){if(!this._configs[i]&&!YAHOO.lang.isUndefined(h[i])){this.setAttributeConfig(i)
}}for(var j=0,l=this._configOrder.length;
j<l;
++j){if(g[this._configOrder[j]]!==undefined){this.set(this._configOrder[j],g[this._configOrder[j]],k)
}}},set:function(i,g,j){var h=this.get("element");
if(!h){this._queue[this._queue.length]=["set",arguments];
if(this._configs[i]){this._configs[i].value=g
}return
}if(!this._configs[i]&&!YAHOO.lang.isUndefined(h[i])){e.call(this,i)
}return b.prototype.set.apply(this,arguments)
},setAttributeConfig:function(j,h,g){var i=this.get("element");
if(i&&!this._configs[j]&&!YAHOO.lang.isUndefined(i[j])){e.call(this,j,h)
}else{b.prototype.setAttributeConfig.apply(this,arguments)
}this._configOrder.push(j)
},getAttributeKeys:function(){var h=this.get("element");
var g=b.prototype.getAttributeKeys.call(this);
for(var i in h){if(!this._configs[i]){g[i]=g[i]||h[i]
}}return g
},createEvent:function(g,h){this._events[g]=true;
b.prototype.createEvent.apply(this,arguments)
},init:function(g,h){a.apply(this,arguments)
}};
var a=function(h,i){this._queue=this._queue||[];
this._events=this._events||{};
this._configs=this._configs||{};
this._configOrder=[];
i=i||{};
i.element=i.element||h||null;
this.DOM_EVENTS={click:true,dblclick:true,keydown:true,keypress:true,keyup:true,mousedown:true,mousemove:true,mouseout:true,mouseover:true,mouseup:true,focus:true,blur:true,submit:true};
var g=false;
if(YAHOO.lang.isString(h)){e.call(this,"id",{value:i.element})
}if(d.get(h)){g=true;
c.call(this,i);
f.call(this,i)
}YAHOO.util.Event.onAvailable(i.element,function(){if(!g){c.call(this,i)
}this.fireEvent("available",{type:"available",target:i.element})
},this,true);
YAHOO.util.Event.onContentReady(i.element,function(){if(!g){f.call(this,i)
}this.fireEvent("contentReady",{type:"contentReady",target:i.element})
},this,true)
};
var c=function(g){this.setAttributeConfig("element",{value:d.get(g.element),readOnly:true})
};
var f=function(g){this.initAttributes(g);
this.setAttributes(g,true);
this.fireQueue()
};
var e=function(i,g){var h=this.get("element");
g=g||{};
g.name=i;
g.method=g.method||function(j){h[i]=j
};
g.value=g.value||h[i];
this._configs[i]=new YAHOO.util.Attribute(g,this)
};
YAHOO.augment(YAHOO.util.Element,b)
})();
YAHOO.register("element",YAHOO.util.Element,{version:"2.5.1",build:"984"});
