function artistidx_ontogglesong(){
var w=$("artist_rightsong_week");
var y=$("artist_rightsong_year");
if(w&&y){
Element.toggle(w);
Element.toggle(y);
}
}
function idx_ontogglesong(_3){
var w=$(_3+"_rightsong_week");
var y=$(_3+"_rightsong_year");
if(w&&y){
Element.toggle(w);
Element.toggle(y);
}
}
function artistwiki_onclickbtn(p){
var _7=$("artist_profilehiddenpreview");
if(_7){
_7.value=p;
}
}
function artist_topfansonradio(_8,_9,_a){
var _b=$(_8);
var _c=$(_9);
if(_b&&_c){
if(_a){
Element.show(_b);
Element.hide(_c);
}else{
Element.hide(_b);
Element.show(_c);
}
}
}
function artist_albumonchange(_d){
var _e=$(_d);
if(_e){
_e.click();
}
}
function hideSubList(id){
try{
var _10=document.getElementById(id);
_10.style.display="none";
}
catch(e){
}
}
focusLinkArray=new Object();
function focusLinks(_11){
if(!focusLinkArray[_11]){
focusLinkArray[_11]=getElementsByAttribute("class",_11);
}
for(var i=0;i<focusLinkArray[_11].length;i++){
addClass(focusLinkArray[_11][i],"link_focus");
}
}
function unFocusLinks(_13){
if(!focusLinkArray[_13]){
focusLinkArray[_13]=getElementsByAttribute("class",_13);
}
for(var i=0;i<focusLinkArray[_13].length;i++){
removeClass(focusLinkArray[_13][i],"link_focus");
}
}
function openTag(_15,_16,_17,_18,_19){
var _1a=document.getElementById(_15);
var _1b=document.getElementById(_16);
if(_1a.className.indexOf(_17)<0){
addClass(_1a,"nav_cur");
removeClass(_1b,"nav_cur");
document.getElementById(_18).style.display="block";
document.getElementById(_19).style.display="none";
document.getElementById(_18+"_ctrlbar").style.display="block";
document.getElementById(_19+"_ctrlbar").style.display="none";
}
return false;
}
var YOBOINPUTDEFAULT={msgStyle:{color:"#cccccc","text-align":"left"},style:{color:"#000","text-align":"left"},msgValue:"\u8bf7\u8f93\u5165",clearMsgButton:"submit",groupName:"default"};
var inputGroup={"default":0};
function YInput(_1c,_1d,_1e){
if(!_1d){
_1d={};
}
if(!_1d.msgStyle){
_1d.msgStyle={color:"#cccccc"};
}
if(!_1d.style){
_1d.style={color:"#000000"};
}
if(!_1d.msgValue){
_1d.msgValue="\u8bf7\u8f93\u5165";
}
if(!_1d.groupName){
_1d.groupName="default";
}
this.dom=$(_1c);
this.disable=false;
this.dom.readOnly=false;
this.groupFlag=false;
this.args=_1d;
this.handles=_1e;
if(_1d.groupName&&typeof inputGroup[_1d.groupName]=="undefined"){
inputGroup[_1d.groupName]=0;
}
this.setMsg();
this.observeEvent();
}
YInput.prototype.observeEvent=function(){
Event.observe(this.dom,"focus",this.focus.bindAsEventListener(this));
Event.observe(this.dom,"blur",this.blur.bindAsEventListener(this));
Event.observe(this.dom,"keyup",this.keyup.bindAsEventListener(this));
if(this.args.clearMsgButton){
var _1f=$(this.args.clearMsgButton);
Event.observe(_1f,"click",this.beforeSubmit.bindAsEventListener(this));
}
};
YInput.prototype.disabled=function(){
if(this.disable){
return false;
}
this.disable=true;
this.dom.readOnly=true;
this.dom.addClassName("readonly");
if(this.dom.value==""||this.dom.value==this.args.msgValue){
this.clearInput();
}
};
YInput.prototype.enabled=function(){
if(!this.disable){
return false;
}
this.dom.removeClassName("readonly");
this.disable=false;
this.dom.readOnly=false;
this.setMsg();
};
YInput.prototype.clearInput=function(){
this.dom.value="";
this.dom.style.color=this.args.style.color;
this.miniGroupFlag();
};
YInput.prototype.setMsg=function(){
try{
if(this.dom.value==""||this.dom.value==this.args.msgValue){
this.dom.value=this.args.msgValue;
this.dom.style.color=this.args.msgStyle.color;
this.addGroupFlag();
}
}
catch(e){
alert(e);
}
};
YInput.prototype.beforeSubmit=function(){
if(this.dom.value==this.args.msgValue){
this.clearInput();
}
};
YInput.prototype.focus=function(){
if(this.disable){
return false;
}
if(this.dom.value==this.args.msgValue){
this.clearInput();
}
if(this.args.borderFColor){
this.dom.style.border="1px solid "+this.args.borderFColor;
}
};
YInput.prototype.blur=function(){
if(this.disable){
return false;
}
if(this.dom.value==""){
this.setMsg();
}else{
}
if(this.handles){
if(this.handles.blur){
this.handles.blur();
}
}
if(this.args.borderColor){
this.dom.style.border="1px solid "+this.args.borderColor;
}
};
YInput.prototype.keyup=function(){
if(this.disable){
return false;
}
if(this.handles){
if(this.handles.keyup){
this.handles.keyup();
}
}
};
YInput.prototype.addGroupFlag=function(){
if(!this.groupFlag){
if(this.args.groupName){
inputGroup[this.args.groupName]++;
}
this.groupFlag=true;
}
};
YInput.prototype.miniGroupFlag=function(){
if(this.groupFlag){
if(this.args.groupName){
inputGroup[this.args.groupName]--;
}
this.groupFlag=false;
}
};
function yoboInput(_20,_21,_22){
if(!_21){
_21={};
}
if(!_21.msgStyle){
_21.msgStyle={color:"#cccccc"};
}
if(!_21.style){
_21.style={color:"#000000"};
}
if(!_21.msgValue){
_21.msgValue="\u8bf7\u8f93\u5165";
}
if(!_21.groupName){
_21.groupName="default";
}
if(_21.groupName&&typeof inputGroup[_21.groupName]=="undefined"){
inputGroup[_21.groupName]=0;
}
var _23=$(_20);
if(_23){
if(_23.value==""||_23.value==_21.msgValue){
setMsg();
}
}
Event.observe(_23,"focus",function(_24){
if(this.value==_21.msgValue){
clearInput();
}
if(_21.borderFColor){
_23.style.border="1px solid "+_21.borderFColor;
}
});
Event.observe(_23,"blur",function(_25){
if(this.value==""){
setMsg();
}else{
}
if(_22){
if(_22.blur){
_22.blur();
}
}
if(_21.borderColor){
_23.style.border="1px solid "+_21.borderColor;
}
});
Event.observe(_23,"keyup",function(_26){
if(_22){
if(_22.keyup){
_22.keyup();
}
}
});
function clearInput(){
_23.value="";
_23.style.color=_21.style.color;
if(_21.groupName){
inputGroup[_21.groupName]--;
}
}
function setMsg(){
_23.value=_21.msgValue;
_23.style.color=_21.msgStyle.color;
if(_21.groupName){
inputGroup[_21.groupName]++;
}
}
if(_21.clearMsgButton){
var _27=$(_21.clearMsgButton);
Event.observe(_27,"click",function(_28){
if(this.value==_21.msgValue){
clearInput();
}
});
}
}
