function sgh_onlisttoggle(_1,_2){
var _3=$("sgh_listmorebtn_"+_1);
var _4=$("sgh_listlessbtn_"+_1);
var _5=$("sgh_listmoreinfo_"+_1);
var _6=$("sgh_listlessinfo_"+_1);
if(_3&&_4&&_5&&_6){
if(_2){
Element.hide(_3);
Element.hide(_6);
Element.show(_4);
Element.show(_5);
}else{
Element.show(_3);
Element.show(_6);
Element.hide(_4);
Element.hide(_5);
}
}
}
function sgh_showsendmessage(_7,_8,_9){
var _a=$("yobo_sendmessage_dialog");
var _b=$("yobo_sendmessage_dialogtitle");
var _c=$("yobo_sendmessage_dialoghiddenid");
var yb=$("singerhome");
if(_a&&_b&&_c&&yb){
before_showfloatdialog();
Element.show(_a);
_b.innerHTML=MSG_FRIENDSENDMSG+_7;
_c.value=_8;
var wd=365;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
var top=getPos(_9,"Top");
_a.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
_a.style.top=top+"px";
}
}
function music_dialogtoggle(id,_13){
var mn=$("music_"+id+"min");
var mx=$("music_"+id+"max");
var bd=$("music_"+id+"body");
var hd=$("music_"+id+"header2");
if(mn&&mx&&bd){
if(_13){
Element.hide(mn);
Element.show(mx);
Element.hide(bd);
if(hd){
Element.hide(hd);
}
}else{
Element.show(mn);
Element.hide(mx);
Element.show(bd);
if(hd){
Element.show(hd);
}
}
}
}
function ab_listen(aid,div){
show_loading(div);
new Ajax.Request("/album/listen/"+aid,{asynchronous:true,evalScripts:true});
}
function ab_fav(aid,div){
show_loading(div);
new Ajax.Request("/album/fav/"+aid,{asynchronous:true,evalScripts:true});
}
function sgh_showupload(div,_1d,_1e){
var dlg=$("sgh_upload_profile");
var tit=$("sgh_uploadprofile_title");
var cnt=$("sgh_uploadprofile_content");
var yb=$("yobo");
if(dlg&&tit&&cnt&&yb){
before_showfloatdialog();
var wd=500;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
if(_1e){
tit.innerHTML=MSG_SGHUPLOADFIRSTLEFT+_1d+MSG_SGHUPLOADFIRSTRIGHT;
cnt.value=MSG_SGHUPLOADCONTENTFIRST;
}else{
tit.innerHTML=MSG_SGHUPLOADLEFT+_1d+MSG_SGHUPLOADRIGHT;
cnt.value=MSG_SGHUPLOADCONTENT;
}
dlg.style.top=getPos(div,"Top")+"px";
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
Element.show(dlg);
}
}
function sgh_onsubmitupprofile(div){
var ar=$("sgh_uploadprofile_content");
if(ar){
input_onfocusclear(ar);
if(ar.value.length==0){
alert(ERROR_NO_UPLOADCONTENT);
}else{
if(ar.value.length>2048){
alert(MSG_UPLOADCONTENTMAX);
}else{
show_loading(div);
return true;
}
}
}
return false;
}
function abh_showupload(div,_29,_2a){
var dlg=$("abh_upload_profile");
var tit=$("abh_uploadprofile_title");
var cnt=$("abh_uploadprofile_content");
var yb=$("yobo");
if(dlg&&tit&&cnt&&yb){
before_showfloatdialog();
var wd=500;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
if(_2a){
tit.innerHTML=MSG_ABHUPLOADFIRSTLEFT+_29+MSG_ABHUPLOADFIRSTRIGHT;
cnt.value=MSG_ABHUPLOADCONTENTFIRST;
}else{
tit.innerHTML=MSG_ABHUPLOADLEFT+_29+MSG_ABHUPLOADRIGHT;
cnt.value=MSG_ABHUPLOADCONTENT;
}
dlg.style.top=getPos(div,"Top")+"px";
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
Element.show(dlg);
}
}
function abh_onsubmitupprofile(div){
var ar=$("abh_uploadprofile_content");
if(ar){
input_onfocusclear(ar);
if(ar.value.length==0){
alert(ERROR_NO_UPLOADCONTENT);
}else{
if(ar.value.length>2048){
alert(MSG_UPLOADCONTENTMAX);
}else{
show_loading(div);
return true;
}
}
}
return false;
}
function abh_onlistensong(_34){
pop_addsong(_34);
}
function abh_onsubmitcomment(div){
var _36=$("abh_commentarea");
if(_36){
input_onfocusclear(_36);
if(_36.value.length==0){
alert(ERROR_NO_COMMENTCONTENT);
}else{
if(_36.value.length>2000){
alert(ERROR_COMMENTMAX);
}else{
show_loading(div);
return true;
}
}
}
return false;
}
function sp_onpreview(_37){
var isp=$("is_preview");
var sl=$("sp_songlist");
var hid=$("song_list");
if(isp&&sl&&hid){
if(_37){
isp.value=1;
}else{
isp.value=0;
}
hid.value=$A(sl.getElementsByClassName("sp_songitem")).map(function(n){
return getAttr(n,"sid");
}).join(",");
}
}
function sp_oninsertsong(div){
var sl=$("sp_songlist");
if(sl){
var si=$A(sl.getElementsByClassName("sp_songitem"));
var len=si.length;
if(len>=10){
alert(MSG_GROUPINSERTSONGMAX);
}else{
show_loading(div);
var top=getPos(div,"Top");
new Ajax.Request("/topic/insert_song?top="+top,{asynchronous:true,evalScripts:true,method:"get"});
}
}
}
function soh_onuploadtag(div){
var dlg=$("soh_upload_tag");
var yb=$("yobo");
if(dlg&&yb){
var wd=400;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
dlg.style.top=getPos(div,"Top")+"px";
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
Element.show(dlg);
}
}
function soh_onsubmittag(div){
var cnt=$("tag_list");
if(cnt){
if(cnt.value.length==0){
alert(ERROR_NO_SONGTAG);
}else{
show_loading(div);
return true;
}
}
return false;
}
function soh_onuploadlyric(div){
var dlg=$("soh_upload_lyric");
var yb=$("yobo");
if(dlg&&yb){
var wd=500;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
dlg.style.top=getPos(div,"Top")+"px";
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
Element.show(dlg);
}
}
function soh_onsubmitlyric(div){
var cnt=$("lyric_content");
if(cnt){
if(cnt.value.length==0){
alert(ERROR_NO_UPLOADCONTENT);
}else{
if(cnt.value.length>2048){
alert(MSG_UPLOADCONTENTMAX);
}else{
show_loading(div);
return true;
}
}
}
return false;
}
function srm_onsubmitreqmanage(div){
var ar=$("srm_uploadprofile_content");
if(ar){
input_onfocusclear(ar);
if(ar.value.length==0){
alert(MSG_REQMANAGENOTEXT);
}else{
if(ar.value.length>2000){
alert(MSG_REQMANAGENOTEXT_MAX);
}else{
show_loading(div);
return true;
}
}
}
return false;
}
function sgh_onreqmanage(div){
var dlg=$("singer_reqmanage");
var yb=$("yobo");
if(dlg&&yb){
var wd=500;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
dlg.style.top=getPos(div,"Top")+"px";
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
Element.show(dlg);
}
}
function arh_onuploadtag(div){
var dlg=$("arh_upload_tag");
var yb=$("yobo");
if(dlg&&yb){
var wd=400;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
dlg.style.top=getPos(div,"Top")+"px";
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
Element.show(dlg);
}
}
