var imgView=false;
jQuery(document).ready(function(){
if(imgView){
jQuery("img").load(function(){
if(this.width>500){
this.width=450;
this.removeAttribute("height");
}
});
}
});
function submitMessaageWall(_1){
show_loading(_1);
if(jQuery("#fans_wall_typee").attr("value")=="1"){
unfondSinger=false;
fondSinger=true;
}else{
if(jQuery("#fans_wall_typee").attr("value")=="2"){
unfondSinger=true;
fondSinger=false;
}
}
}
function setTheMaxOfTextArea(_2,_3,_4){
if(!_2&&!_3){
return false;
}
var _5=document.getElementById(_2);
var _6=document.getElementById(_3);
var _7=_5.value.length;
var _8=Math.max(0,(_4-_7));
_6.innerHTML=_7;
if(_7>_4){
_5.value=_5.value.substr(0,_4);
_6.innerHTML=_4;
alert("\u5b57\u6570\u4e0d\u80fd\u591a\u4e8e"+_4);
return false;
}
}
function toggleElement(_9){
jQuery(_9).toggle();
}
function toggleEements(_a,_b){
jQuery(_a).show();
jQuery(_b).hide();
return false;
}
function focuFirstInput(_c){
}
var UA=navigator.userAgent;
if(/MSIE 6/.test(UA)){
UA="ie";
}else{
if(/Gecko/.test(UA)){
UA="gecko";
}else{
if(/MSIE 7/.test(UA)){
UA="ie7";
}else{
if(/Opera/.test(UA)){
UA="opera";
}
}
}
}
var PRINTEDIALOG_AUTOHIDE_TIMER=null;
var LOADING_BAR_TIMER=null;
var MSG_INPUTVALUEDEFAULT=["\u5728\u8fd9\u91cc\u5199\u4e0b\u4f60\u8981\u53d1\u9001\u7684\u6d88\u606f","\u53ef\u8f93\u5165\u591a\u4e2aEmail\uff0c\u7528\u9017\u53f7\u9694\u5f00","\u8bf7\u6dfb\u52a0\u4f60\u7684\u4e50\u8bc4","\u597d\u5927\u4e00\u9762\u6d82\u9e26\u5899\u8036\uff01\u9080\u8bf7\u4f60\u7684\u670b\u53cb\u4eec\u4e00\u8d77\u521b\u4f5c\uff01\uff01\uff01","\u5728TA\u7684\u7559\u8a00\u5899\u4e0a\u5199\u70b9\u4ec0\u4e48\u5148\u2026\u2026","\u5199\u70b9\u4ec0\u4e48(\u53ef\u9009)","\u8bf7\u8f93\u5165\u57ce\u5e02\u540d\u79f0","\u8bf7\u5728\u8fd9\u91cc\u8f93\u5165\u60a8\u8981\u4e0a\u4f20\u7684\u6b4c\u624b\u8d44\u6599","\u8bf7\u5728\u8fd9\u91cc\u8f93\u5165\u60a8\u8981\u4e0a\u4f20\u7684\u4e13\u8f91\u8d44\u6599","\u8bf7\u5728\u8fd9\u91cc\u8f93\u5165\u60a8\u8981\u8865\u5145\u7684\u5185\u5bb9","\u8f93\u5165\u52a0\u4e3a\u597d\u53cb\u7684\u7406\u7531","\u4e07\u80fd\u641c","\u8bf7\u5728\u8fd9\u91cc\u8f93\u5165\u60a8\u7684\u7533\u8bf7\u7406\u7531","\u544a\u8bc9\u670b\u53cb\u6211\u5728\u5e72\u4ec0\u4e48","\u4f60\u4e3a\u4ec0\u4e48\u559c\u6b22TA\uff1f","\u4f60\u4e3a\u4ec0\u4e48\u8ba8\u538cTA\uff1f"];
function initPageInterface(){
var _d=null;
if(navigator.appName.indexOf("Microsoft")!=-1){
_d=window["pagesongplayer"];
}else{
_d=document["pagesongplayer"];
}
if(typeof yobo_init_pageplayer=="function"){
if(_d&&typeof (_d.close)=="function"){
yobo_init_pageplayer();
}else{
Event.observe(window,"load",yobo_init_pageplayer.bindAsEventListener(window));
}
}
}
function yobo_sigonout(){
new Ajax.Request("/signout/logout",{method:"get",asynchronous:true,evalScripts:true});
}
function getPos(el,_f){
el=$(el);
var _10=0;
while(el!=null){
_10+=el["offset"+_f];
el=el.offsetParent;
}
return _10;
}
function show_loading(div){
if(LOADING_BAR_TIMER){
clearTimeout(LOADING_BAR_TIMER);
}
div=$(div);
var lb=$("tool_loadingbar");
if(div&&lb){
var top=getPos(div,"Top");
var _14=getPos(div,"Left");
var w=div.offsetWidth;
var h=div.offsetHeight;
w=Math.max(w,21);
h=Math.max(h,16);
h=Math.min(h,30);
Element.show("tool_loadingbar");
lb.style.top=(top-1)+"px";
lb.style.left=(_14-1)+"px";
lb.style.width=(w-21)+"px";
lb.style.height=(h-1)+"px";
Element.show("tool_loadingbar");
LOADING_BAR_TIMER=setTimeout(function(){
Element.hide("tool_loadingbar");
},30*1000);
}
}
function hide_loading(){
if(LOADING_BAR_TIMER){
clearTimeout(LOADING_BAR_TIMER);
}
var lb=$("tool_loadingbar");
if(lb){
Element.hide(lb);
}
}
function getPageOffsetY(){
var _18=0;
if(UA=="ie"||UA=="ie7"){
_18=document.documentElement.scrollTop;
}else{
_18=pageYOffset;
}
return _18;
}
function copyToClipboard(txt){
if(window.clipboardData){
window.clipboardData.clearData();
window.clipboardData.setData("Text",txt);
}else{
if(navigator.userAgent.indexOf("Opera")!=-1){
window.location=txt;
}else{
if(window.netscape){
try{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}
catch(e){
return false;
}
var _1a=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);
if(!_1a){
return;
}
var _1b=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
if(!_1b){
return;
}
_1b.addDataFlavor("text/unicode");
var str=new Object();
var len=new Object();
var str=Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
var _1e=txt;
str.data=_1e;
_1b.setTransferData("text/unicode",str,_1e.length*2);
var _1f=Components.interfaces.nsIClipboard;
if(!_1f){
return;
}
_1a.setData(_1b,null,_1f.kGlobalClipboard);
}
}
}
}
function input_onfocusclear(ipt){
for(var i=MSG_INPUTVALUEDEFAULT.length-1;i>=0;i--){
if(ipt.value==MSG_INPUTVALUEDEFAULT[i]){
ipt.value="";
ipt.index=i;
}
}
ipt.style.color="#333333";
ipt.select();
}
function input_onblur(ipt){
if(ipt.value==""){
ipt.value=MSG_INPUTVALUEDEFAULT[ipt.index];
}
ipt.style.color="";
}
var PRINTEDIALOG_AUTOHIDE_TIMER=null;
var LOADING_BAR_TIMER=null;
function show_floatdialog(_23,top){
var fd=$("yobo_floatdialog");
var yb=$("yobo_page_v4");
if(fd&&yb){
hide_mainplayer();
var wd=_23+80;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
fd.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
if(!top){
top=170;
}
fd.style.top=(getPageOffsetY()+top)+"px";
Element.show(fd);
}
}
function hide_floatdialog(){
var fd=$("yobo_floatdialog");
if(fd){
Element.hide(fd);
show_mainplayer();
setTimeout(function(){
if($("yobo_floatdialog_content")){
$("yobo_floatdialog_content").innerHTML="";
}
},1);
}
}
function change_friendlist(_2b,sel,top){
var gid=sel.value;
show_loading(sel);
new Ajax.Request("/recommend/recommend?song_id="+_2b+"&is_page=1"+"&gid="+gid+"&top="+top,{asynchronous:true,evalScripts:true,method:"post"});
}
function change_friendlist_activity(_2f,sel,top){
var gid=sel.value;
show_loading(sel);
new Ajax.Request("/activity/invite_view?aid="+_2f+"&is_page=1"+"&gid="+gid+"&top="+top,{asynchronous:true,evalScripts:true,method:"post"});
}
function printE(_33){
show_printEdialog(_33);
}
function openURL(url){
window.location.href=url;
}
function show_printEdialog(_35){
if(!_35.showall){
before_showfloatdialog();
}
var dlg=$("yobo_printEdialog");
var tit=$("yobo_printEdialog_title");
var cnt=$("yobo_printEdialog_content");
var _39=$("yobo_printEdialog_okbtn");
var _3a=$("yobo_printEdialog_funcbtn");
var _3b=$("yobo_printEdialog_cancelbtn");
if(dlg&&tit&&cnt&&_39&&_3a&&_3b){
try{
if(PRINTEDIALOG_AUTOHIDE_TIMER){
clearTimeout(PRINTEDIALOG_AUTOHIDE_TIMER);
}
var _3c=_35.title?_35.title:ERROR_GENERAL_MSG;
var _3d=_35.type?_35.type:"alert";
var _3e=_35.className?_35.className:"error";
var _3f=_35.onclick?_35.onclick:"";
var _40=_35.li?_35.li:ERROR_PRINTE_MSG;
tit.innerHTML=_3c;
var ct="";
_40.each(function(el,_43){
ct+="<li>"+el+"</li>";
});
cnt.innerHTML=ct;
if(_3d=="alert"){
Element.show(_39);
Element.hide(_3a);
Element.hide(_3b);
_39.onclick=function(){
hide_printEdialog(!_35.showall);
return false;
};
autohide_printEdialog(3,!_35.showall);
}else{
Element.hide(_39);
Element.show(_3a);
Element.hide(_3b);
_3a.onclick=function(){
eval(_3f);
hide_printEdialog(!_35.showall);
return false;
};
}
dlg.style.top=getPageOffsetY()+250+"px";
dlg.style.left=$("yobo_page_v4").offsetLeft+260+"px";
Element.show(dlg);
if(_3d=="alert"){
_39.focus();
}else{
_3a.focus();
}
}
catch(e){
alert(e);
}
}
}
function hide_printEdialog(_44){
if(PRINTEDIALOG_AUTOHIDE_TIMER){
clearTimeout(PRINTEDIALOG_AUTOHIDE_TIMER);
}
var dlg=$("yobo_printEdialog");
var _46=$("yobo_printEdialog_closeinfo");
if(dlg&&_46){
Element.hide(dlg);
_46.innerHTML="";
}
if(_44){
show_mainplayer();
}
}
function autohide_printEdialog(idx,_48){
if(PRINTEDIALOG_AUTOHIDE_TIMER){
clearTimeout(PRINTEDIALOG_AUTOHIDE_TIMER);
}
if(idx==0){
var dlg=$("yobo_printEdialog");
if(dlg){
Element.hide(dlg);
}
if(_48){
show_mainplayer();
}
}else{
var _4a=$("yobo_printEdialog_closeinfo");
if(_4a){
Element.show(_4a);
_4a.innerHTML="("+idx+MSG_PRINTEAUTOHIDETEXT+")";
PRINTEDIALOG_AUTOHIDE_TIMER=setTimeout("autohide_printEdialog("+(idx-1)+", "+_48+")",700);
}
}
}
function show_logindlg(_4b){
var dlg=$("yobo_loginfloatdialog");
var yb=$("yobo_page_v4");
if(dlg&&yb){
before_showfloatdialog();
var wd=450;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
var top=getPageOffsetY()+170;
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
dlg.style.top=top+"px";
Element.show(dlg);
focuFirstInput(dlg);
if(typeof _4b!="undefined"){
var _52=$("signon_type_hidden");
if(_52){
_52.value=_4b;
}
}
}
}
function show_registdlg(){
var dlg=$("yobo_regfloatdialog");
var yb=$("yobo_page_v4");
if(dlg&&yb){
before_showfloatdialog();
var wd=450;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
var top=getPageOffsetY()+170;
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
dlg.style.top=top+"px";
Element.show(dlg);
focuFirstInput(dlg);
}
}
function show_singerfonddlg(div,sid,_5b){
var dlg=$("yobo_singerfond");
var tit=$("yobo_singerfond_title");
var cnt=$("yobo_singerfond_content");
var hid=$("yobo_singerfond_sid");
var yb=$("yobo_page_v4");
if(dlg&&tit&&cnt&&hid&&yb){
before_showfloatdialog();
tit.innerHTML=_5b;
hid.value=sid;
cnt.value=MSG_INPUTVALUEDEFAULT[14];
var wd=500;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
var top=getPageOffsetY()+170;
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
dlg.style.top=top+"px";
Element.show(dlg);
focuFirstInput(dlg);
}
}
function show_singerunfonddlg(div,sid,_67){
var dlg=$("yobo_singerunfond");
var tit=$("yobo_singerunfond_title");
var cnt=$("yobo_singerunfond_content");
var hid=$("yobo_singerunfond_sid");
var yb=$("yobo_page_v4");
if(dlg&&tit&&cnt&&hid&&yb){
before_showfloatdialog();
tit.innerHTML=_67;
hid.value=sid;
cnt.value=MSG_INPUTVALUEDEFAULT[15];
var wd=500;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
var top=getPageOffsetY()+170;
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
dlg.style.top=top+"px";
Element.show(dlg);
focuFirstInput(dlg);
}
}
function closePageCover(){
before_showfloatdialog();
}
function before_showfloatdialog(){
try{
var _71=[["yobo_floatdialog","yobo_floatdialog_content"],["yobo_sendmessage_dialog",false],["idxl_tipblock","idxl_tipblock"],["uf_creategroupdialog",false],["uf_renamegroupdialog",false],["yobo_helpcsvdialog",false],["yobo_helpmainfeedsetting",false],["ubx_renameboxdialog",false],["tool_ubox_addfav_dialog","tool_ubox_addfav_dialog"],["up_tipblock","up_tipblock"],["ubx_createboxdialog",false],["sgh_upload_profile",false],["abh_upload_profile",false],["soh_upload_lyric",false],["soh_upload_tag",false],["yobo_friendrequest","yobo_friendrequest_content"],["gh_newmessage","gh_newmessage_content"],["singer_reqmanage",false],["yobo_loginfloatdialog",false],["yobo_regfloatdialog",false],["yobo_singerfond","yobo_singerfond_content"],["yobo_singerunfond","yobo_singerunfond_content"],["yobo_floatlyric",false],["yobo_sgfdialog_form",false],["aggrmusic_commentsongdialog",false],["aggrmusic_commentalbumdialog",false],["yobo_loginlistendialog",false],["yobo_loginfrienddialog",false],["ub_settingdialog",false],["sor_uplyricdlg","sor_uplyric_content"]];
for(var i=0;i<_71.length;i++){
var dlg=$(_71[i][0]);
var clr=_71[i][1];
if(dlg){
Element.hide(dlg);
if(clr){
var cdv=$(clr);
if(cdv){
cdv.value="";
}
}
}
}
hide_loading();
hide_printEdialog();
hide_mainplayer();
}
catch(e){
alert(e);
}
}
function hide_mainplayer(){
var blk=$("flashbar");
if(blk){
blk.style.visibility="hidden";
}
}
function show_mainplayer(){
var blk=$("flashbar");
if(blk){
blk.style.visibility="visible";
}
}
function uf_showsendmessage(_78,fid,div,wid,_7c){
var dlg=$("yobo_sendmessage_dialog");
var dtt=$("yobo_sendmessage_dialogtitle");
var dct=$("yobo_sendmessage_dialogcontent");
var dhi=$("yobo_sendmessage_dialoghiddenid");
var yb=$(wid);
if(dlg&&dtt&&dct&&dhi&&yb){
Element.show(dlg);
focuFirstInput(dlg);
dtt.innerHTML=MSG_FRIENDSENDMSG+_78;
if(_7c){
dct.innerHTML=_7c;
}
dhi.value=fid;
var wd=365;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
var top=getPos(div,"Top");
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
dlg.style.top=top+"px";
}
}
function uf_hidesendmessage(){
var dlg=$("yobo_sendmessage_dialog");
if(dlg){
Element.hide(dlg);
}
}
function uf_onsendmessage(div){
var ctt=$("yobo_sendmessage_dialogcontent");
if(ctt){
input_onfocusclear(ctt);
if(ctt.value.length==0){
alert(ERROR_NO_FRIENDMESSAGE);
}else{
if(ctt.value.length>2000){
alert(ERROR_GROUPSENDMSGTOALL_MAX);
}else{
show_loading(div);
return true;
}
}
}
return false;
}
function uf_clearsendmessage(){
var cnt=$("yobo_sendmessage_dialogcontent");
if(cnt){
cnt.value=MSG_INPUTVALUEDEFAULT[0];
}
}
function single_song_player(sid){
show_singlewidget(sid);
}
function show_singlewidget(sid,div,_8d){
var sph=$("yobo_songmenubar_hidden");
var pfm=$("yobo_songmenubar_pagefrom");
if(sph&&pfm){
if(!sid){
sid=sph.value;
}
if(div){
show_loading(div);
}
var _90="";
if(_8d){
_90="&song_file_id="+_8d;
}
new Ajax.Request("/song/singleplayerxml2/"+sid+"?fr="+pfm.value+_90,{method:"get",asynchronous:true,evalScripts:true});
new Ajax.Request("/song/single_song_player/"+sid+"?top=170&fr="+pfm.value+_90,{method:"get",asynchronous:true,evalScripts:true});
}
}
function feedback_fondsong(sid){
show_addtobox(sid,null,null);
}
function show_addtobox(sid,div,_94,_95){
var pfm=$("yobo_songmenubar_pagefrom");
if(pfm){
if(!sid){
var hid=$("yobo_songmenubar_hidden");
if(hid){
sid=hid.value;
}else{
return false;
}
}
if(!_94){
var fom=$("yobo_songmenubar_from");
if(fom){
_94=fom.value;
}else{
return false;
}
}
show_loading(div);
var _99="";
if(_95){
_99="&song_file_id="+_95;
}
new Ajax.Request("/box/fond/"+sid+"?from="+_94+"&fr="+pfm.value+_99,{method:"get",asynchronous:true,evalScripts:true});
}
}
function feedback_unfondsong(sid){
show_dislikesong(sid);
}
function show_dislikesong(sid,div,_9d,_9e){
var pfm=$("yobo_songmenubar_pagefrom");
if(pfm){
if(!sid){
var hid=$("yobo_songmenubar_hidden");
if(hid){
sid=hid.value;
}else{
return false;
}
}
if(!_9d){
var fom=$("yobo_songmenubar_from");
if(fom){
_9d=fom.value;
}else{
return false;
}
}
show_loading(div);
var _a2="";
if(_9e){
_a2="&song_file_id="+_9e;
}
new Ajax.Request("/user/add_unfond_song?song_id="+sid+"&from="+_9d+"&fr="+pfm.value+_a2,{method:"get",asynchronous:true,evalScripts:true});
}
}
function show_review_comment_dialog(_a3,_a4,_a5){
var fd=$("yobo_comment_review_dialog");
var yb=$("yobo_page_v4");
if(fd&&yb){
var wd=400;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
var top=getPageOffsetY()+170;
fd.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
fd.style.top=top+"px";
Element.show(fd);
$("comment_review_id").value=_a3;
$("review_comment_message").innerHTML="\""+_a5+"\"";
$("comment_review_user").innerHTML=_a4;
}
}
function hide_review_comment_dialog(){
var dlg=$("yobo_comment_review_dialog");
if(dlg){
Element.hide(dlg);
}
}
function recommend_song(sid){
show_recommendsong(sid);
}
function show_recommendsong(sid,div,_b0){
var pfm=$("yobo_songmenubar_pagefrom");
if(pfm){
if(!sid){
var hid=$("yobo_songmenubar_hidden");
if(hid){
sid=hid.value;
}else{
return false;
}
}
if(div){
show_loading(div);
}
var _b3="";
if(_b0){
_b3="&song_file_id="+_b0;
}
new Ajax.Request("/recommend/recommend?song_id="+sid+"&top=170&fr="+pfm.value+_b3,{method:"get",asynchronous:true,evalScripts:true});
}
}
function changemusic(_b4,_b5){
return false;
new Ajax.Request("url"+"?singer_id="+_b4+"&song_id="+_b5,{asynchronous:true,evalScripts:true});
}
function show_friendlogindlg(){
var dlg=$("yobo_loginfrienddialog");
var yb=$("yobo_page_v4");
if(dlg&&yb){
before_showfloatdialog();
var wd=660;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
var top=getPageOffsetY()+170;
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
dlg.style.top=top+"px";
Element.show(dlg);
focuFirstInput(dlg);
}
}
function ab_fav(aid,div){
show_loading(div);
new Ajax.Request("/album/fav/"+aid,{asynchronous:true,evalScripts:true});
}
function show_add_tag(_be,_bf){
var dlg=$("yobo_add_tag");
var yb=$("yobo_page_v4");
if(dlg&&yb){
before_showfloatdialog();
var wd=500;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
var top=getPageOffsetY()+140;
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
dlg.style.top=top+"px";
Element.show(dlg);
focuFirstInput(dlg);
}
}
function hide_add_tag(){
var dlg=$("yobo_add_tag");
if(dlg){
Element.hide(dlg);
}
}
function show_add_lyric(_c7){
var dlg=$("yobo_add_lyric");
var yb=$("yobo_page_v4");
if(dlg&&yb){
before_showfloatdialog();
var wd=500;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
var top=getPageOffsetY()+200;
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
dlg.style.top=top+"px";
Element.show(dlg);
focuFirstInput(dlg);
}
}
function hide_add_lyric(){
var dlg=$("yobo_add_lyric");
if(dlg){
Element.hide(dlg);
}
}
function rsf_onsubmitrecomment(){
var cnt=$("yobo_rfsdialog_contentarea");
var smt=$("yobo_rsfdialog_submit");
if(cnt&&smt){
if(cnt.value.length>2000){
alert(ERROR_RECOMMENDCONTENTMAX);
}else{
show_loading(smt);
return true;
}
}
return false;
}
function rsf_onsubmitrecommentanony(){
var cnt=$("yobo_rfsadialog_contentarea");
var smt=$("yobo_rsfadialog_submit");
var eml=$("yobo_rsfadialog_emaillist");
if(cnt&&smt&&eml){
if(eml.value.length==0){
alert(ERROR_NO_EMAIL);
}else{
if(eml.value.length>1000){
alert(ERROR_EMAILMAX);
}else{
if(cnt.value.length>2000){
alert(ERROR_RECOMMENDCONTENTMAX);
}else{
show_loading(smt);
return true;
}
}
}
}
return false;
}
function g_selectAllCheckbox(tar,_d5,_d6,_d7){
var fm=$(_d5);
if(_d6){
var cl=fm[_d6];
}else{
var cl=fm["checkbox[]"];
}
if(cl&&fm&&tar){
var ck=tar.checked;
var ll=$A(cl);
if(ll.length>0){
ll.each(function(el,_dd){
el.checked=ck;
});
}else{
cl.checked=ck;
}
if(_d7){
_d7.checked=ck;
}
}
return true;
}
function g_removeAllCheckbox(tar,all){
var acb=$(all);
if(acb){
if(!tar.checked){
acb.checked=false;
}
}
}
function focuFirstInput(_e1){
try{
var _e2=$(_e1).getElementsByTagName("input");
for(var i=0;i<_e2.length;i++){
var _e4=_e2[i];
if(_e4.type=="text"&&(_e4.style.display!="none"||_e4.style.visibility!="hidden")){
_e4.focus();
return;
}
}
}
catch(e){
}
}
function show_oninvaildsongurl(sid){
var dlg=$("songbar_nourldialog");
var dlk=$("sbardlg_link");
var yb=$("yobo_page_v4");
if(dlg&&dlk&&yb){
Element.show(dlg);
dlk.href="/upload/song?song_id="+sid;
var wd=450;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
var top=150;
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
dlg.style.top=(getPageOffsetY()+top)+"px";
}
}
function setGAURL(url){
try{
pageTracker._trackPageview(url);
}
catch(e){
}
}
function sgh_onlisttoggle(idx,_ef){
var _f0=$("sgh_listmorebtn_"+idx);
var _f1=$("sgh_listlessbtn_"+idx);
var _f2=$("sgh_listmoreinfo_"+idx);
var _f3=$("sgh_listlessinfo_"+idx);
if(_f0&&_f1&&_f2&&_f3){
if(_ef){
Element.hide(_f0);
Element.hide(_f3);
Element.show(_f1);
Element.show(_f2);
}else{
Element.show(_f0);
Element.show(_f3);
Element.hide(_f1);
Element.hide(_f2);
}
}
}
function sgh_showsendmessage(_f4,fid,div){
var dlg=$("yobo_sendmessage_dialog");
var dtt=$("yobo_sendmessage_dialogtitle");
var dhi=$("yobo_sendmessage_dialoghiddenid");
var yb=$("singerhome");
if(dlg&&dtt&&dhi&&yb){
before_showfloatdialog();
Element.show(dlg);
dtt.innerHTML=MSG_FRIENDSENDMSG+_f4;
dhi.value=fid;
var wd=365;
var wy=yb.offsetWidth;
var yl=getPos(yb,"Left");
var top=getPos(div,"Top");
dlg.style.left=(Math.floor((wy-wd)/2)+yl)+"px";
dlg.style.top=top+"px";
}
}
function music_dialogtoggle(id,type){
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(type){
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,_10a,_10b){
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(_10b){
tit.innerHTML=MSG_SGHUPLOADFIRSTLEFT+_10a+MSG_SGHUPLOADFIRSTRIGHT;
cnt.value=MSG_SGHUPLOADCONTENTFIRST;
}else{
tit.innerHTML=MSG_SGHUPLOADLEFT+_10a+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,_116,_117){
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(_117){
tit.innerHTML=MSG_ABHUPLOADFIRSTLEFT+_116+MSG_ABHUPLOADFIRSTRIGHT;
cnt.value=MSG_ABHUPLOADCONTENTFIRST;
}else{
tit.innerHTML=MSG_ABHUPLOADLEFT+_116+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(list){
pop_addsong(list);
}
function abh_onsubmitcomment(div){
var cont=$("abh_commentarea");
if(cont){
input_onfocusclear(cont);
if(cont.value.length==0){
alert(ERROR_NO_COMMENTCONTENT);
}else{
if(cont.value.length>2000){
alert(ERROR_COMMENTMAX);
}else{
show_loading(div);
return true;
}
}
}
return false;
}
function sp_onpreview(flag){
var isp=$("is_preview");
var sl=$("sp_songlist");
var hid=$("song_list");
if(isp&&sl&&hid){
if(flag){
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);
}
}
if(typeof yobo_trace=="undefined"){
yobo_trace=function(str,e){
};
}
var page_controler="(unknow)";
try{
var path=window.location.pathname.split("/");
page_controler="("+path[1]+")";
}
catch(e){
}
var undef=[];
var YOBO_SP_STATUS_STOP=0;
var YOBO_SP_STATUS_LOAD=1;
var YOBO_SP_STATUS_PLAY=2;
var YOBO_SP_STATUS_PAUSE=3;
var YOBO_SL_LOOP_ORDER=0;
var YOBO_SL_LOOP_RND=1;
var YOBO_SL_LOOP_BACK=2;
var playbar_timeout=30*1000;
if(typeof document.SP=="undefined"){
document.SP={};
}
var ads=[{imgUrl_s:"/images/v4/ad/song_bar/mm_2.gif",aUrl_s:"http://mm.yobo.com",imgUrl_l:"/images/v4/ad/song_bar/mm_l_2.gif",aUrl_l:"http://mm.yobo.com"}];
var ad_index=0;
function Yobo_Song(url,sid,rnd,aid,_152,_153,_154,ip,_156){
this.type="song";
this.url=url;
this.sid=sid;
this.rnd=rnd;
this.singer_id=_152;
this.aid=aid;
this.song_file_id=_153;
this.company_id=_154;
this.ip=ip;
this.session_id=_156;
}
Yobo_Song.prototype.toString=getSongInf;
function getSongInf(){
var str="";
str+="rnd:"+this.rnd+"<br />";
str+="url:"+this.url+"<br />";
str+="sid:"+this.sid+"<br />";
str+="aid:"+this.aid+"<br />";
str+="song_file_id:"+this.song_file_id+"<br />";
str+="company_id:"+this.company_id+"<br />";
str+="ip:"+this.ip+"<br />";
str+="session_id:"+this.session_id+"<br />";
return str;
}
function Yobo_SongList(_158){
this.type="song_list";
for(songRND in _158){
this[songRND]=_158[songRND];
}
this.songs=songArray;
}
Yobo_SongList.prototype.toString=getSongListInf;
function getSongListInf(){
var str="";
for(songRND in this){
if(typeof this[songRND]=="function"){
continue;
}
str+=songRND+": ";
str+=this[songRND]+"<br />";
}
return str;
}
function getFlashDOM(_15a){
var _15b=null;
if(navigator.appName.indexOf("Microsoft")!=-1){
_15b=window[_15a];
}else{
_15b=document[_15a];
}
return _15b;
}
function Yobo_v4_songPlayer(){
this.sp_status=YOBO_SP_STATUS_STOP;
this.sp_listmethod=YOBO_SL_LOOP_ORDER;
this.sp_song=null;
this.sp_songlist=null;
this.sp_listcuridx=0;
this.sp_loadtimer=null;
this.sp_looptimer=null;
this.ext_flash=getFlashDOM("pagesongplayer");
}
Yobo_v4_songPlayer.prototype.setPlayList=function(list){
this.sp_songlist=list;
this.sp_listcuridx=0;
};
Yobo_v4_songPlayer.prototype.playList=function(){
var _15d=0;
if(this.sp_song!=null){
_15d=this.getIndexInList(this.sp_song.rnd);
}
if(_15d!=-1){
switch(this.sp_status){
case YOBO_SP_STATUS_STOP:
if(typeof document.SP[this.sp_songlist]=="undefined"){
document.SP[this.sp_songlist]=getListByClass(this.sp_songlist);
}
this.sp_song=document.SP[this.sp_songlist][_15d];
this.sp_listcuridx=_15d;
this.sp_song.onclick();
setGAURL("/ajax/song_bar/play_list"+page_controler);
break;
case YOBO_SP_STATUS_LOAD:
break;
case YOBO_SP_STATUS_PLAY:
this.pauseSong();
break;
case YOBO_SP_STATUS_PAUSE:
this.resumeSong();
break;
default:
exceptionTrace("Error Yobo_v4_songPlayer::playList -> unknown status: "+this.sp_status);
}
}else{
this.sp_listcuridx=0;
if(typeof document.SP[this.sp_songlist]!="undefined"){
document.SP[this.sp_songlist][0].onclick();
}
}
};
Yobo_v4_songPlayer.prototype.isReady=function(){
this.ext_flash=getFlashDOM("pagesongplayer");
if(this.ext_flash&&typeof this.ext_flash.close=="function"){
return true;
}
return false;
};
Yobo_v4_songPlayer.prototype.playSong=function(url,sid,rnd,aid,_162,_163,_164,ip,_166,_167){
try{
if(!this.isReady()){
exceptionTrace("Error yobo_songPlayer::playSong -> no init");
return false;
}
var song=new Yobo_Song(url,sid,rnd,aid,_162,_163,_164,ip,_166);
if(this.sp_song!=null&&song.rnd==this.sp_song.rnd){
switch(this.sp_status){
case YOBO_SP_STATUS_STOP:
this.loadSong();
setGAURL("/ajax/song_bar/play"+page_controler);
break;
case YOBO_SP_STATUS_LOAD:
break;
case YOBO_SP_STATUS_PLAY:
this.pauseSong();
setGAURL("/ajax/song_bar/pause"+page_controler);
break;
case YOBO_SP_STATUS_PAUSE:
this.resumeSong();
break;
default:
exceptionTrace("Error Yobo_v4_songPlayer::playSong -> unknown status: "+this.sp_status);
}
}else{
if(this.sp_status!=YOBO_SP_STATUS_STOP){
yobo_music_playlog(this.sp_song,parseInt(this.ext_flash.getPosi()),0);
this.stopSong();
}
if(this.sp_songlist!=_167){
this.sp_songlist=_167;
if(typeof document.SP=="undefined"){
document.SP={};
}
if(typeof document.SP[_167]=="undefined"){
document.SP[_167]=getListByClass(_167);
}
}
this.sp_song=song;
this.loadSong();
}
return true;
}
catch(e){
exceptionTrace("Error yobo_songPlayer::playSong -> ",e);
}
};
Yobo_v4_songPlayer.prototype.loadSong=function(){
if(!this.isReady()){
exceptionTrace("Error yobo_songPlayer::loadSong -> no init");
return false;
}
var url=this.sp_song.url;
var sid=this.sp_song.sid;
var rnd=this.sp_song.rnd;
var isup=this.sp_song.siup;
if(url==""||url=="-1"){
show_oninvaildsongurl(sid);
return false;
}
try{
clearTimeout(this.sp_loadtimer);
clearTimeout(this.sp_looptimer);
if(this.sp_status==YOBO_SP_STATUS_STOP){
this.sp_status=YOBO_SP_STATUS_LOAD;
stopPlaySound();
try{
this.ext_flash.start(url);
}
catch(e){
exceptionTrace("Error yobo_songPlayer::loadSong(EXT) -> ",e);
}
var _16d=this;
ii=0;
this.sp_loadtimer=setTimeout(function(){
_16d.loadTimeout();
},playbar_timeout);
this.sp_looptimer=setTimeout(function(){
_16d.loopSong();
},700);
var _16e=$(rnd+"_song_control");
if(_16e){
_16e.className="song_resume";
show_loading(_16e);
}
if(this.sp_songlist){
var _16f=$(this.sp_songlist+"_ctrl_bar");
if(_16f){
_16f.className="ctrlstop";
}
}
}
}
catch(e){
exceptionTrace("Error yobo_songPlayer::loadSong -> ",e);
}
};
Yobo_v4_songPlayer.prototype.pauseSong=function(){
try{
if(!this.isReady()){
exceptionTrace("Error yobo_songPlayer::pauseSong -> no init");
return false;
}
if(this.sp_status==YOBO_SP_STATUS_PLAY){
clearTimeout(this.sp_looptimer);
this.sp_status=YOBO_SP_STATUS_PAUSE;
try{
this.ext_flash.pause();
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::pauseSong(EXT) -> ",e);
}
var _170=$(this.sp_song.rnd+"_song_control");
if(_170){
_170.className="";
}
if(this.sp_songlist){
var _171=$(this.sp_songlist+"_ctrl_bar");
if(_171){
_171.className="ctrlplay";
}
}
}
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::pauseSong -> ",e);
}
};
Yobo_v4_songPlayer.prototype.resumeSong=function(){
try{
if(!this.isReady()){
exceptionTrace("Error Yobo_v4_songPlayer::resumeSong -> no init");
return false;
}
if(this.sp_status==YOBO_SP_STATUS_PAUSE){
clearTimeout(this.sp_looptimer);
this.sp_status=YOBO_SP_STATUS_PLAY;
try{
this.ext_flash.resume();
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::resumeSong(EXT) -> ",e);
}
var _172=$(this.sp_song.rnd+"_song_control");
if(_172){
_172.className="song_resume";
}
if(this.sp_songlist){
var _173=$(this.sp_songlist+"_ctrl_bar");
if(_173){
_173.className="ctrlstop";
}
}
var _174=this;
this.sp_looptimer=setTimeout(function(){
_174.loopSong();
},700);
}
}
catch(e){
exceptionTrace("Error yobo_songPlayer::resumeSong -> ",e);
}
};
Yobo_v4_songPlayer.prototype.loadTimeout=function(){
try{
clearTimeout(this.sp_loadtimer);
clearTimeout(this.sp_looptimer);
if(this.sp_status==YOBO_SP_STATUS_STOP||this.sp_status==YOBO_SP_STATUS_LOAD){
printE({title:"\u9519\u8bef\u4fe1\u606f",li:["\u8bfb\u53d6\u6b4c\u66f2\u8d85\u65f6\uff01"],type:"alert",className:"error"});
this.stopSong();
this.playNext();
}
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::loadTimeout -> ",e);
}
};
function adLog(oA){
setGAURL("/out/"+oA.href.substring(7));
}
var ii=0;
Yobo_v4_songPlayer.prototype.loopSong=function(){
try{
clearTimeout(this.sp_looptimer);
if(this.sp_status!=YOBO_SP_STATUS_STOP){
var dur=parseInt(this.ext_flash.getDur());
var pos=parseInt(this.ext_flash.getPosi());
var off=Math.floor((dur-pos)/1000);
ii++;
if(off>1){
if(this.sp_status==YOBO_SP_STATUS_LOAD){
clearTimeout(this.sp_loadtimer);
this.sp_status=YOBO_SP_STATUS_PLAY;
hide_loading();
yobo_music_playlog(this.sp_song,pos,11);
try{
if($(this.sp_song.rnd+"_ad_a")&&$(this.sp_song.rnd+"_ad_i")){
$(this.sp_song.rnd+"_ad_a").href=ads[ad_index].aUrl_l;
$(this.sp_song.rnd+"_ad_i").src=ads[ad_index].imgUrl_l;
}else{
if($(this.sp_song.rnd+"_ad_a_s")&&$(this.sp_song.rnd+"_ad_i_s")){
$(this.sp_song.rnd+"_ad_a_s").href=ads[ad_index].aUrl_s;
$(this.sp_song.rnd+"_ad_i_s").src=ads[ad_index].imgUrl_s;
}
}
ad_index++;
ad_index%=ads.length;
$(this.sp_song.rnd+"_songbar_inf_block").style.display="block";
}
catch(e){
}
}
var _179=$(this.sp_song.rnd+"_song_item");
var _17a=_179.offsetWidth;
var len=_17a*(pos/dur)-614;
_179.style.backgroundPosition=len+"px 0px";
var dm=(Math.floor(off/60)).toString();
var ds=(off%60).toString();
if(dm.length==1){
dm="0"+dm;
}
if(ds.length==1){
ds="0"+ds;
}
$(this.sp_song.rnd+"_song_time").innerHTML=dm+":"+ds;
}else{
if(this.sp_status!=YOBO_SP_STATUS_STOP&&this.sp_status!=YOBO_SP_STATUS_LOAD){
yobo_music_playlog(this.sp_song,pos,10);
setGAURL("/ajax/song_bar/play_finish"+page_controler);
var _17e=this.getIndexInList(this.sp_song.rnd);
if(_17e==-1){
this.stopSong();
}else{
this.stopSong();
this.playNext();
}
}
}
var _17f=this;
this.sp_looptimer=setTimeout(function(){
_17f.loopSong();
},700);
}
}
catch(e){
exceptionTrace("Error yobo_songPlayer::loopSong -> ",e);
}
};
Yobo_v4_songPlayer.prototype.stopSong=function(){
try{
if(!this.isReady()){
exceptionTrace("Error Yobo_v4_songPlayer::stopSong -> no init");
return false;
}
clearTimeout(this.sp_loadtimer);
clearTimeout(this.sp_looptimer);
this.sp_status=YOBO_SP_STATUS_STOP;
if(this.sp_song==null){
return false;
}
try{
$(this.sp_song.rnd+"_songbar_inf_block").style.display="none";
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::stopSong(EXT) -> ",e);
}
try{
this.ext_flash.close();
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::stopSong(EXT) -> ",e);
}
var _180=$(this.sp_song.rnd+"_song_control");
var _181=$(this.sp_song.rnd+"_song_time");
var _182=$(this.sp_song.rnd+"_song_item");
if(_180&&_181&&_182){
_180.className="";
_181.innerHTML="00:00";
var _183=_182.offsetWidth;
_182.style.backgroundPosition=(_183-614)+"px 0px";
}
if(this.sp_songlist){
var _184=$(this.sp_songlist+"_ctrl_bar");
if(_184){
_184.className="ctrlplay";
}
}
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::stopSong -> ",e);
}
};
Yobo_v4_songPlayer.prototype.playNext=function(){
try{
if(!this.isReady()){
exceptionTrace("Error Yobo_v4_songPlayer::playNext -> no init");
return false;
}
if(this.sp_songlist==null){
return false;
}
if(this.getNextIndex()){
song=document.SP[this.sp_songlist][this.sp_listcuridx];
if(song){
song.onclick();
}
}
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::playNext -> ",e);
}
};
Yobo_v4_songPlayer.prototype.playPrev=function(){
try{
if(!this.isReady()){
exceptionTrace("Error Yobo_v4_songPlayer::playPrev -> no init");
return false;
}
if(this.sp_songlist==null){
return false;
}
if(this.getPrevIndex()){
song=document.SP[this.sp_songlist][this.sp_listcuridx];
if(song){
song.onclick();
}
}
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::playNext -> ",e);
}
};
Yobo_v4_songPlayer.prototype.getNextIndex=function(){
try{
if(this.sp_songlist==null){
return false;
}
if(typeof document.SP[this.sp_songlist]=="undefined"){
return false;
}
var _185=document.SP[this.sp_songlist].length;
if(_185==0){
return false;
}
this.sp_listcuridx=this.getIndexInList(this.sp_song.rnd);
if(this.sp_listcuridx==-1){
this.sp_listcuridx=0;
}
switch(this.sp_listmethod){
case YOBO_SL_LOOP_RND:
this.sp_listcuridx=Math.floor(Math.random()*_185);
break;
default:
this.sp_listcuridx++;
}
this.sp_listcuridx=(this.sp_listcuridx+_185)%_185;
return true;
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::getNextIndex -> ",e);
return false;
}
};
Yobo_v4_songPlayer.prototype.getPrevIndex=function(){
try{
if(this.sp_songlist==null){
return false;
}
if(typeof document.SP[this.sp_songlist]=="undefined"){
return false;
}
var _186=document.SP[this.sp_songlist].length;
if(_186==0){
return false;
}
this.sp_listcuridx=this.getIndexInList(this.sp_song.rnd);
if(this.sp_listcuridx==-1){
this.sp_listcuridx=0;
}
switch(this.sp_listmethod){
case YOBO_SL_LOOP_RND:
this.sp_listcuridx=Math.floor(Math.random()*_186);
break;
default:
this.sp_listcuridx--;
}
this.sp_listcuridx=(this.sp_listcuridx+_186)%_186;
return true;
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::getPrevIndex -> ",e);
return false;
}
};
Yobo_v4_songPlayer.prototype.getIndexInList=function(_187){
var _188=-1;
try{
yobo_trace(this.sp_songlist);
if(this.sp_songlist==null){
return _188;
}
if(typeof document.SP[this.sp_songlist]!="undefined"){
(document.SP[this.sp_songlist]).each(function(oA,_18a){
if(oA.id==_187+"_song_control"){
_188=_18a;
}
});
}
return _188;
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::getIndexInList -> ",e);
return _188;
}
};
var SONG_PLAYER=new Yobo_v4_songPlayer();
function yobo_music_playlog(song,pos,_18d){
new Ajax.Request("/player/write_log"+"?song_id="+song.sid+"&song_file_id="+song.song_file_id+"&album_id="+song.aid+"&singer_id="+song.singer_id+"&company_id="+song.company_id+"&session_id="+song.session_id+"&ip="+song.ip+"&duration="+pos+"&from_url="+escape(window.location.href.toString())+"&log_type="+_18d,{method:"get",asynchronous:true,evalScripts:true});
}
if(typeof (yobo_init_pageplayer)!="function"){
yobo_init_pageplayer=function(){
};
}
function play_song(url,sid,rnd,aid,_192,_193,_194,ip,_196,_197){
try{
if(!yb_login){
show_logindlg("normal");
return false;
}
if(typeof play!="undefined"){
play.pauseSong();
}
}
catch(e){
exceptionTrace("Error Yobo_v4_songPlayer::yobo_play_song -> ",e);
}
SONG_PLAYER.playSong(url,sid,rnd,aid,_192,_193,_194,ip,_196,_197);
}
function set_play_list(l){
if(!l){
return false;
}
SONG_PLAYER.setPlayList(l);
}
function play_listprev(){
SONG_PLAYER.playPrev();
}
function play_listnext(){
SONG_PLAYER.playNext();
}
function update_listmethod(){
SONG_PLAYER.updateListMethod();
}
if(typeof (yobo_flashcallback_play)!="function"){
yobo_flashcallback_play=function(){
SONG_PLAYER.stopSong();
};
}
function yobo_play_stop(){
SONG_PLAYER.stopSong();
}
function stopPlaySound(){
var _199=getFlashDOM("finalPlayer");
if(_199){
try{
_199.PauseMP3();
}
catch(e){
exceptionTrace("Error stopPlaySound(WIN) -> ",e);
}
}
}
function showOperation_block(opID){
$(opID+"_song_operation_block").style.visibility="visible";
}
function hideOperation_block(opID){
$(opID+"_song_operation_block").style.visibility="hidden";
}
function playSongList(_19c,_19d){
if(SONG_PLAYER.sp_songlist==_19c){
switch(SONG_PLAYER.sp_status){
case YOBO_SP_STATUS_STOP:
case YOBO_SP_STATUS_PAUSE:
_19d.className="ctrlstop";
break;
case YOBO_SP_STATUS_LOAD:
break;
case YOBO_SP_STATUS_PLAY:
default:
_19d.className="ctrlplay";
break;
}
SONG_PLAYER.playList();
}else{
yobo_play_stop();
SONG_PLAYER.sp_songlist=_19c;
SONG_PLAYER.playList();
}
}
function changePlaySongType(_19e){
if(SONG_PLAYER.sp_listmethod==YOBO_SL_LOOP_ORDER){
SONG_PLAYER.sp_listmethod=YOBO_SL_LOOP_RND;
_19e.className="ctrlrnd";
}else{
SONG_PLAYER.sp_listmethod=YOBO_SL_LOOP_ORDER;
_19e.className="ctrlorder";
}
}
if(typeof jQuery!="undefined"){
jQuery(document).ready(function(){
jQuery(".song_ul > .songbar_item").hover(function(){
jQuery(this).addClass("hover");
},function(){
jQuery(this).removeClass("hover");
});
});
}
if(typeof exceptionTrace=="undefined"){
exceptionTrace=new Function();
}
function getListByClass(cl){
return $$("."+cl);
}
function report_songerror(_1a0,_1a1,_1a2,_1a3){
var dlg=$("song_error_dlg");
setGAURL("/ajax/song_bar/report_error");
if(dlg){
hide_mainplayer();
$("error_song_name").innerHTML=_1a2;
$("error_artist_name").innerHTML=_1a3;
$("error_song_id").value=_1a0;
$("error_song_file_id").value=_1a1;
dlg.style.display="block";
var _1a5=dlg.offsetWidth;
var _1a6=dlg.offsetHeight;
var _1a7=document.body.offsetWidth;
var left=parseInt((_1a7-_1a5)/2);
var top=getPageOffsetY()+_1a6/2;
dlg.style.left=left+"px";
dlg.style.top=top+"px";
}
}
function songbar_fondSong(sid,div,from,_1ad){
var pfm=$("yobo_songmenubar_pagefrom");
setGAURL("/ajax/song_bar/fond");
if(pfm){
if(!sid){
var hid=$("yobo_songmenubar_hidden");
if(hid){
sid=hid.value;
}else{
return false;
}
}
if(!from){
var fom=$("yobo_songmenubar_from");
if(fom){
from=fom.value;
}else{
return false;
}
}
var _1b1="";
if(_1ad){
_1b1="&song_file_id="+_1ad;
}
show_loading(div);
new Ajax.Request("/box/fond/"+sid+"?from="+from+"&fr="+pfm.value+_1b1,{method:"get",asynchronous:true,evalScripts:true});
}
}
function songbar_widget(sid,div,_1b4){
var sph=$("yobo_songmenubar_hidden");
var pfm=$("yobo_songmenubar_pagefrom");
if(sph&&pfm){
if(!sid){
sid=sph.value;
}
if(div){
show_loading(div);
}
var _1b7="";
if(_1b4){
_1b7="&song_file_id="+_1b4;
}
new Ajax.Request("/song/singleplayerxml2/"+sid+"?fr="+pfm.value,{method:"get",asynchronous:true,evalScripts:true});
new Ajax.Request("/song/single_song_player/"+sid+"?top=170&fr="+pfm.value+_1b7,{method:"get",asynchronous:true,evalScripts:true});
}
}
function songbar_recommendsong(sid,div,_1ba){
var pfm=$("yobo_songmenubar_pagefrom");
setGAURL("/ajax/song_bar/recommend");
if(pfm){
if(!sid){
var hid=$("yobo_songmenubar_hidden");
if(hid){
sid=hid.value;
}else{
return false;
}
}
if(div){
show_loading(div);
}
var _1bd="";
if(_1ba){
_1bd="&song_file_id="+_1ba;
}
new Ajax.Request("/recommend/recommend?song_id="+sid+"&top=170&fr="+pfm.value+_1bd,{method:"get",asynchronous:true,evalScripts:true});
}
}
function showRecommendType(_1be){
var list=["linker_invite_link","msn_link","mail_link","email_link"];
var op=$("other_link");
if($(_1be+"_zone")&&$(_1be+"_zone").style.display=="block"){
showRecommendOther();
return false;
}
for(var i=0;i<list.length;i++){
var cont=$(list[i]);
if(cont.id==_1be){
cont.style.display="block";
}else{
cont.style.display="none";
}
var zone=$(list[i]+"_zone");
if(zone.id==_1be+"_zone"){
zone.style.display="block";
var type="";
if(_1be=="msn_link"){
type="im";
}else{
if(_1be=="mail_link"){
type="mail";
}else{
if(_1be=="email_link"){
type="email";
$("recomment_typee").value="";
}
}
}
$("recomment_type").value=type;
}else{
zone.style.display="none";
}
if(_1be=="linker_invite_link"){
$("yobo_rfsdialog_contentarea").setAttribute("readonly","readonly");
$("yobo_rfsdialog_contentarea").addClassName("disabled");
$("yobo_rsfdialog_submit").setAttribute("disabled","disabled");
$("rsdialog_privacy1").setAttribute("disabled","disabled");
$("rsdialog_privacy2").setAttribute("disabled","disabled");
$("yobo_rsfdialog_submit").style.display="none";
$("yobo_disable_submit").style.display="inline";
}
}
if(op){
op.style.display="block";
}
}
function before_recommend(){
if($("recomment_type").value=="im"){
$("username").value=$("msn_username").value;
$("password").value=$("msn_password").value;
$("recomment_typee").value="msn";
}else{
if($("recomment_type").value=="mail"){
$("username").value=$("mail_username").value;
$("password").value=$("mail_password").value;
$("recomment_typee").value=$("mail_type").value;
}
}
}
function showRecommendOther(){
var op=$("other_link");
var list=["linker_invite_link","msn_link","mail_link","email_link"];
for(var i=0;i<list.length;i++){
var type=$(list[i]);
var zone=$(list[i]+"_zone");
type.style.display="block";
zone.style.display="none";
}
$("yobo_rfsdialog_contentarea").removeAttribute("readonly");
$("yobo_rfsdialog_contentarea").removeClassName("disabled");
$("yobo_rsfdialog_submit").removeAttribute("disabled","disabled");
$("rsdialog_privacy1").removeAttribute("disabled","disabled");
$("rsdialog_privacy2").removeAttribute("disabled","disabled");
$("yobo_rsfdialog_submit").style.display="inline";
$("yobo_disable_submit").style.display="none";
$("recomment_type").value="normal";
if(op){
op.style.display="none";
}
}
