if(typeof (yobo_SWF)!="function"){
var yobo_SWF=Class.create();
yobo_SWF.prototype={initialize:function(_1,id,_3,_4,w,h,_7,_8){
this.id=id?id:"";
this.classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000";
this.codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+(_3?_3:"7")+",0,0,0";
this.width=w;
this.height=h;
this.align="middle";
this.movie=_1;
this.bgcolor=_7?_7:"#ffffff";
this.quality="high";
this.flashvars=_4?_4:"";
this.wmode=_8?_8:"opaque";
this.allowScriptAccess="always";
this.type="application/x-shockwave-flash";
this.getHTML();
},getHTML:function(){
this.html="<object ";
this.html+="classid=\""+this.classid+"\" ";
this.html+="codebase=\""+this.codebase+"\" ";
this.html+="width=\""+this.width+"\" ";
this.html+="height=\""+this.height+"\" ";
this.html+="align=\""+this.align+"\" ";
this.html+="id=\""+this.id+"\">";
this.html+="<param value=\""+this.movie+"\" name=\"movie\"/>";
this.html+="<param value=\""+this.bgcolor+"\" name=\"bgcolor\"/>";
this.html+="<param value=\""+this.flashvars+"\" name=\"FlashVars\"/>";
this.html+="<param value=\""+this.wmode+"\" name=\"wmode\"/>";
this.html+="<param value=\""+this.quality+"\" name=\"quality\"/>";
this.html+="<embed ";
this.html+="src=\""+this.movie+"\" ";
this.html+="FlashVars=\""+this.flashvars+"\" ";
this.html+="quality=\""+this.quality+"\" ";
this.html+="bgcolor=\""+this.bgcolor+"\" ";
this.html+="align=\""+this.align+"\" ";
this.html+="name=\""+this.id+"\" ";
this.html+="wmode=\""+this.wmode+"\" ";
this.html+="width=\""+this.width+"\" ";
this.html+="height=\""+this.height+"\" ";
this.html+="type=\""+this.type+"\" ";
this.html+="> </embed></object>";
},write:function(_9){
var _a=$(_9);
if(!_a){
return;
}
_a.innerHTML=this.html;
}};
}
if(typeof (yobo_scrollHArea)!="function"){
var yobo_scrollHArea=Class.create();
yobo_scrollHArea.prototype={initialize:function(_b){
this.content=$(_b.content);
this.w=_b.w;
this.h=_b.h;
this.ch=this.h-32;
this.parent=this.content.parentNode;
this.step=15;
this.create();
},create:function(){
var ct=document.createElement("div");
ct.style.width=this.w+"px";
ct.style.height=this.h+"px";
ct.style.display="block";
ct.style.overflow="hidden";
this.parent.insertBefore(ct,this.content);
this.container=ct;
var tp=document.createElement("div");
tp.className="block_scrollHtop_normal";
tp.style.width=this.w+"px";
tp.innerHTML="";
this.container.appendChild(tp);
this.toparea=tp;
var cn=document.createElement("div");
cn.style.width=(this.w-2)+"px";
cn.style.height=this.ch+"px";
cn.style.display="block";
cn.style.overflow="hidden";
cn.style.border="1px dotted #ddd";
cn.style.position="relative";
this.container.appendChild(cn);
this.middlearea=cn;
var bt=document.createElement("div");
bt.className="block_scrollHbottom_normal";
bt.style.width=this.w+"px";
bt.innerHTML="";
this.container.appendChild(bt);
this.bottomarea=bt;
this.middlearea.appendChild(this.content);
this.content.style.position="absolute";
this.content.style.top="0px";
this.attevt();
},attevt:function(){
this.th=this.content.offsetHeight;
Event.observe(this.toparea,"click",this.scrollup.bindAsEventListener(this));
Event.observe(this.bottomarea,"click",this.scrolldown.bindAsEventListener(this));
},scrollup:function(){
if(parseInt(this.th)>parseInt(this.ch)){
var t=parseInt(this.content.style.top);
t=t+this.step;
t=Math.max(t,(this.ch-this.th));
t=Math.min(t,0);
this.content.style.top=t+"px";
}
},scrolldown:function(){
if(parseInt(this.th)>parseInt(this.ch)){
var t=parseInt(this.content.style.top);
t=t-this.step;
t=Math.max(t,(this.ch-this.th));
t=Math.min(t,0);
this.content.style.top=t+"px";
}
}};
}
if(typeof (yobo_flyingItem)!="function"){
yobo_flyingItem=Class.create();
yobo_flyingItem.prototype={initialize:function(_12){
if(_12.target){
this.start=$(_12.start);
}
if(_12.target){
this.target=$(_12.target);
}
this.img_url=_12.img_url;
if(_12.opacity){
this.opacity=_12.opacity;
}else{
this.opacity=0.3;
}
if(_12.onArrive){
this.on_arrive=_12.onArrive;
}
if(this.start&&this.target&&this.img_url){
this.start_x=getPos(this.start,"Left");
this.start_y=getPos(this.start,"Top");
this.start_w=this.start.offsetWidth;
this.target_x=getPos(this.target,"Left");
this.target_y=getPos(this.target,"Top");
this.target_w=this.target.offsetWidth;
this.cur_x=this.start_x;
this.cur_y=this.start_y;
this.cur_w=this.start_w;
this.speed=80;
this.interval=80;
this.max_step=15;
this.steps=0;
if(this.initImg()){
this.calcStep();
var _13=this;
this.timer=setInterval(function(){
_13.cur_x=Math.floor(_13.cur_x+_13.step_x);
_13.cur_y=Math.floor(_13.cur_y+_13.step_y);
_13.cur_w=Math.floor(_13.cur_w+_13.step_w);
_13.fly.style.left=_13.cur_x+"px";
_13.fly.style.top=_13.cur_y+"px";
_13.fly_img.width=_13.cur_w;
_13.steps+=1;
var _14=false;
if(Math.abs(_13.target_x-_13.cur_x)<=Math.abs(_13.step_x)){
_14=true;
}
if(Math.abs(_13.target_y-_13.cur_y)<=Math.abs(_13.step_y)){
_14=true;
}
if(_13.steps>_13.max_step){
_14=true;
}
if(_14){
if(_13.timer){
clearTimeout(_13.timer);
}
Element.hide(_13.fly);
Element.remove(_13.fly);
if(_13.on_arrive&&typeof (_13.on_arrive)=="function"){
_13.on_arrive();
}
}
},this.interval);
}
}
},debug:function(){
var str="start: ("+this.start_x+", "+this.start_y+", "+this.start_w+")\n";
str+="target: ("+this.target_x+", "+this.target_y+", "+this.target_w+")\n";
str+="step: ("+this.step_x+", "+this.step_y+", "+this.step_w+")\n";
str+="cur: ("+this.cur_x+", "+this.cur_y+", "+this.cur_w+")";
alert(str);
},calcStep:function(){
var len=Math.pow((this.target_x-this.start_x),2);
len+=Math.pow((this.target_y-this.start_y),2);
len=Math.sqrt(len);
len=this.speed*1/len;
this.step_x=(this.target_x-this.start_x)*len;
this.step_y=(this.target_y-this.start_y)*len;
this.step_w=(this.target_w-this.start_w)*len;
},initImg:function(){
var _17=$("tools");
if(!_17){
return false;
}
var _18="flying_anim_block";
if($(_18)){
Element.remove(_18);
}
var div=document.createElement("div");
div.id=_18;
div.className="block_normal";
_17.appendChild(div);
this.fly=div;
var img=document.createElement("img");
img.id=_18+"_image";
this.fly.appendChild(img);
this.fly_img=img;
this.fly_img.src=this.img_url;
this.fly.style.position="absolute";
this.fly.style.left=this.cur_x+"px";
this.fly.style.top=this.cur_y+"px";
this.fly_img.width=this.cur_w;
Element.show(this.fly);
Element.setOpacity(this.fly,this.opacity);
return true;
}};
}
var CURRENT_FLYING_ITEM=null;
function onFlyingItem(s,t,i){
if(s&&t){
if(!i){
i="/images/flying_anim_default2.gif";
}
CURRENT_FLYING_ITEM=new yobo_flyingItem({start:s,target:t,img_url:i,opacity:1});
}
}
if(typeof (yobo_bindSelectObj)!="function"){
var yobo_bindSelectObj=Class.create();
yobo_bindSelectObj.prototype={initialize:function(div){
this.list=$(div+"_list");
this.btn=$(div+"_btn");
this.lik=$(div+"_link");
this.hed=$(div+"_header");
this.btnclick=false;
if(this.list&&this.btn){
if(this.lik&&this.hed){
Event.observe(this.btn,"mouseover",this.buttonOnOver.bindAsEventListener(this));
Event.observe(this.btn,"mouseout",this.buttonOnOut.bindAsEventListener(this));
}
Event.observe(this.btn,"click",this.buttonOnClick.bindAsEventListener(this));
Event.observe(document,"click",this.documentOnClick.bindAsEventListener(this));
}
},buttonOnClick:function(){
this.btnclick=true;
Element.show(this.list);
this.btn.className="yoboselect_headerbtn_hover";
if(this.lik&&this.hed){
this.hed.className="yoboselect_header_hover";
this.lik.className="yoboselect_headerlink_hover";
}
},buttonOnOver:function(){
if(this.lik&&this.hed){
if(this.list.style.display=="none"){
this.hed.className="yoboselect_header_hover";
}
}
},buttonOnOut:function(){
if(this.lik&&this.hed){
if(this.list.style.display=="none"){
this.hed.className="yoboselect_header";
}
}
},documentOnClick:function(){
if(!this.btnclick){
Element.hide(this.list);
this.btn.className="yoboselect_headerbtn";
if(this.lik&&this.hed){
this.hed.className="yoboselect_header";
this.lik.className="yoboselect_headerlink";
}
}else{
this.btnclick=false;
}
}};
}
function addShadowBorder(_1f,_20,_21){
var rt="<div class=\"block_borders\" style=\"width:"+(_20+28)+"px;\">\n<div class=\"bdheader\">\n<div class=\"bdright\">\n";
rt+="<div class=\"bdcenter\">&nbsp;</div>\n</div>\n</div>\n<div class=\"bdbody\">\n<div class=\"bdright\">\n";
rt+="<div class=\"bdcenter\" style=\"width:"+_20+"px;\">\n";
rt+="<div class=\"closebtn\"><a href=\"#\" onclick=\""+_21+" return false;\"><img src=\"/images/close.gif\" /></a></div>\n";
rt+=_1f+"\n";
rt+="</div>\n</div>\n</div>\n<div class=\"bdfooter\">\n<div class=\"bdright\">\n<div class=\"bdcenter\">&nbsp;</div>\n</div>\n</div>\n</div>\n";
return rt;
}
function finalCheckInput(r){
for(var i=0;i<SEARCH_INPUT_DEFAULT.length;i++){
if(r.value==SEARCH_INPUT_DEFAULT[i]){
r.value="";
}
}
}
var tipsInScreen=false;
function show_tips(evt){
var tip=$("yobo_tips");
if(tip){
w=document.body.offsetWidth;
var el=Event.element(evt);
var ct=TIPS_CONTENT[getAttr(el,"tipstype")];
tip.innerHTML=ct?"<span class=\"n_black\">"+ct+"</span>":"";
tip.style.top=getPos(el,"Top")+el.offsetHeight+"px";
if((Event.pointerX(evt)+20+tip.offsetWidth)>w){
tip.style.left=w-tip.offsetWidth+"px";
}else{
tip.style.left=Event.pointerX(evt)+20+"px";
}
Element.show(tip);
tipsInScreen=true;
}
}
function hide_tips(){
var tip=$("yobo_tips");
if(tip){
tip.innerHTML="";
Element.hide(tip);
tipsInScreen=false;
}
}
function move_tips(evt){
if(tipsInScreen){
var tip=$("yobo_tips");
if(tip){
w=document.body.offsetWidth;
var el=Event.element(evt);
tip.style.top=getPos(el,"Top")+el.offsetHeight+"px";
if((Event.pointerX(evt)+20+tip.offsetWidth)>w){
tip.style.left=w-tip.offsetWidth+"px";
}else{
tip.style.left=Event.pointerX(evt)+20+"px";
}
}
}
}
function show_rfmenu(div,uid,img){
var mn=$("tool_recommend_friend_menu");
var hv=$("tool_recommend_friendid");
if(mn&&hv){
hv.value=uid;
Element.show(mn);
if(img){
mn.style.left=getPos(div,"Left")+div.offsetWidth-mn.offsetWidth+"px";
if(UA=="ie"){
mn.style.top=getPos(div,"Top")+div.offsetHeight-mn.offsetHeight+"px";
}else{
mn.style.top=getPos(div,"Top")-4+"px";
}
}else{
mn.style.left=getPos(div,"Left")+div.offsetWidth+"px";
mn.style.top=getPos(div,"Top")+"px";
}
}
}
function hide_rfmenu(){
var mn=$("tool_recommend_friend_menu");
if(mn){
Element.hide(mn);
}
}
function single_song_player(sid,div){
var sph=$("t_sp_songid_hidden");
var spc=$("t_sp_container");
if(sph&&spc){
var top=0;
if(!sid){
sid=sph.value;
}
if(!div){
top=getPos("user_flashplayer_block","Top")+$("user_flashplayer_block").offsetHeight;
div=$("user_flashplayer_block");
}else{
top=getPos(div,"Top");
}
if(top<450){
top=450;
}
openFloatDialog();
show_loading(div);
new Ajax.Request("/song/singleplayerxml2/"+sid,{method:"get",asynchronous:true,evalScripts:true});
new Ajax.Request("/song/single_song_player/"+sid+"?top="+top,{method:"get",asynchronous:true,evalScripts:true});
}
}
function onclose_single_player_dialog(){
closePageCover(true);
setTimeout(function(){
if($("single_player_widget_dialog")){
$("single_player_widget_dialog").innerHTML="";
}
},10);
}
function addto_musicbox_dialog(sid,div,_3a){
var dg=$("tool_music_box_dialog");
var sph=$("t_sp_songid_hidden");
var spc=$("t_sp_container");
if(dg&&sph&&spc){
var top=400;
if(!div){
return;
div=$("user_flashplayer_block");
top=getPos(div,"Top")+div.offsetHeight;
}else{
top=getPos(div,"Top");
}
if(!sid){
sid=sph.value;
}
if(top<450){
top=450;
}
openFloatDialog();
dg.innerHTML="";
var _3f=getPos(div,"Left");
show_loading(div);
if(_3a){
new Ajax.Request("/box/fond/"+sid+"?from="+_3a,{method:"get",asynchronous:true,evalScripts:true});
}else{
new Ajax.Request("/box/fond/"+sid,{method:"get",asynchronous:true,evalScripts:true});
}
}
}
function onclose_musicbox_dialog(){
closePageCover(true);
setTimeout(function(){
if($("tool_music_box_dialog")){
$("tool_music_box_dialog").innerHTML="";
}
},10);
}
function onover_music_box_item(div,idx){
div.className="block_addbox_item_current";
var del=$("music_box_add_item_"+idx);
if(del){
Element.show(del);
}
}
function onout_music_box_item(div,idx){
div.className="block_addbox_item_normal";
var del=$("music_box_add_item_"+idx);
if(del){
Element.hide(del);
}
}
function onshow_music_box_create(){
var cur=$("music_box_add_create");
var tar=$("music_box_add_create_form");
if(cur&&tar){
Element.show(tar);
Element.hide(cur);
}
}
function onhide_music_box_create(){
var cur=$("music_box_add_create");
var tar=$("music_box_add_create_form");
if(cur&&tar){
Element.hide(tar);
Element.show(cur);
}
}
function recommend_song(id,div){
var dg=$("tool_recommend_dialog");
var sph=$("t_sp_songid_hidden");
var spc=$("t_sp_container");
if(dg&&sph&&spc){
var top=0;
if(!id){
id=sph.value;
}
if(!div){
top=getPos("user_flashplayer_block","Top")+$("user_flashplayer_block").offsetHeight;
div=$("user_flashplayer_block");
}else{
top=getPos(div,"Top");
}
if(top<450){
top=450;
}
openFloatDialog();
Element.hide(dg);
dg.innerHTML="";
show_loading(div);
new Ajax.Request("/recommend/recommend?song_id="+id+"&top="+top,{method:"get",asynchronous:true,evalScripts:true});
}
}
function onclose_recommend_dialog(){
closePageCover(true);
setTimeout(function(){
if($("tool_recommend_dialog")){
$("tool_recommend_dialog").innerHTML="";
}
},10);
}
function giveback_song(div){
var dg=$("tool_recommend_friend_dialog");
var sgh=$("t_sp_givebackid_hidden");
var spc=$("t_sp_container");
if(dg&&sgh&&spc){
openFloatDialog();
Element.hide(dg);
dg.innerHTML="";
var fid=sgh.value;
var top=getPos(spc.value,"Top");
if(top<450){
top=450;
}
show_loading(div);
new Ajax.Request("/recommend/friend_recommend?friend_id="+fid+"&top="+top,{method:"get",asynchronous:true,evalScripts:true});
}
}
function recommend_song_tofriend(id,div){
var dg=$("tool_recommend_friend_dialog");
var mn=$("tool_recommend_friend_menu");
var hv=$("tool_recommend_friendid");
if(dg&&mn&&hv){
openFloatDialog();
Element.hide(dg);
dg.innerHTML="";
if(id){
var fid=id;
}else{
var fid=hv.value;
}
if(div){
var top=getPos(div,"Top");
show_loading(div);
}else{
var top=parseInt(mn.style.top);
show_loading(mn);
}
if(top<450){
top=450;
}
new Ajax.Request("/recommend/friend_recommend?friend_id="+fid+"&top="+top,{method:"get",asynchronous:true,evalScripts:true});
}
}
function onclose_recommend_friend_dialog(){
closePageCover(true);
setTimeout(function(){
if($("tool_recommend_friend_dialog")){
$("tool_recommend_friend_dialog").innerHTML="";
}
},10);
}
function t_rf_onSearchSong(div){
var q=$("t_rf_searchinput");
if(q){
if(q.value==""){
alert(ERROR_EMPTY_SONG_NAME);
}else{
show_loading(div);
new Ajax.Request("/recommend/search_song/",{method:"post",parameters:"q="+q.value,asynchronous:true,evalScripts:true});
}
}
}
function send_leave_message(div){
var fm=$("t_lmf_dialog");
if(fm){
openFloatDialog();
Element.show(fm);
fm.style.left=getPos(div,"Left")+"px";
fm.style.top=getPos(div,"Top")+"px";
}
}
function onclose_leavemsg_dialog(){
closePageCover(true);
setTimeout(function(){
if($("t_lmf_content")){
$("t_lmf_content").value="";
}
},10);
}
function show_messagehistory(id,div){
openFloatDialog();
var top=getPos(div,"Top");
new Ajax.Request("/message/history/"+id+"?top="+top,{method:"get",asynchronous:true,evalScripts:true});
}
function onclose_messagehistory_dialog(){
closePageCover(true);
setTimeout(function(){
if($("tool_messagehistory_dialog")){
$("tool_messagehistory_dialog").innerHTML="";
}
},10);
}
function show_singleplayer_dialog(div,sid,_66,_67,_68){
var spd=$("tool_singleplayer_dialog");
var sph=$("t_sp_songid_hidden");
var spg=$("t_sp_givebackid_hidden");
var sgb=$("t_sp_giveback");
var slk=$("t_sp_like");
var sdl=$("t_sp_dislike");
var spf=$("t_sp_actionfrom");
var spc=$("t_sp_container");
if(typeof (div)=="string"){
div=$(div);
}
if(div&&spd&&sph&&spg&&sgb&&slk&&sdl&&spf&&spc){
Element.show(spd);
Element.setOpacity(spd,0.8);
sph.value=sid;
spg.value=_66;
spd.style.top=getPos(div,"Top")+"px";
spd.style.left=(getPos(div,"Left")+div.offsetWidth)+"px";
spc.value=div.id;
if(_66!="0"){
Element.show(sgb);
}else{
Element.hide(sgb);
}
if(_67!="0"){
Element.show(slk);
}else{
Element.hide(slk);
}
if(_68!="0"){
Element.show(sdl);
}else{
Element.hide(sdl);
}
}
}
function show_popup_dialog(_71){
var ppd=$("tool_popup_dialog");
var ptt=$("t_pd_titletext");
var pct=$("t_pd_contentarea");
var pic=$("t_pd_iconarea");
var pb1=$("t_pd_iknowbtn");
var pb2=$("t_pd_okbtn");
var pb3=$("t_pd_cancelbtn");
if(ppd&&ptt&&pct&&pic&&pb1&&pb2&&pb3){
var _79=_71.title?_71.title:"\u9519\u8bef\u4fe1\u606f";
var _7a=_71.type?_71.type:"alert";
var _7b=_71.className?_71.className:"error";
var _7c=_71.onclick?_71.onclick:"onclose_popup_dialog()";
var _7d=_71.li?_71.li:"\u51fa\u73b0\u9519\u8bef\uff01";
ptt.innerHTML=_79;
var ct="";
_7d.each(function(el,_80){
ct+="<li>"+el+"</li>";
});
pct.innerHTML=ct;
if(_7b=="confirm"){
pic.className="block_popupdialog_alerticon";
}else{
if(_7b=="success"){
pic.className="block_popupdialog_infoicon";
}else{
pic.className="block_popupdialog_erroricon";
}
}
if(_7a=="alert"){
Element.show(pb1);
Element.hide(pb2);
Element.hide(pb3);
}else{
Element.hide(pb1);
Element.show(pb2);
Element.show(pb3);
pb2.onclick=function(){
eval(_7c);
onclose_popup_dialog();
return false;
};
}
if(UA=="ie"||UA=="ie7"){
var _81=document.documentElement.scrollTop;
}else{
if(UA=="gecko"){
var _81=pageYOffset;
}
}
ppd.style.top=_81+450+"px";
ppd.style.left=$("wrap").offsetLeft+260+"px";
closeFloatCover();
Element.show(ppd);
}
}
function onclose_popup_dialog(){
var ppd=$("tool_popup_dialog");
var ptt=$("t_pd_titletext");
var pct=$("t_pd_contentarea");
if(ppd&&ptt&&pct){
Element.hide(ppd);
ptt.innerHTML="";
pct.innerHTML="";
}
}
function dislike_song(div){
var sph=$("t_sp_songid_hidden");
var spf=$("t_sp_actionfrom");
if(sph&&spf){
show_loading(div);
new Ajax.Request("/user/add_unfond_song?song_id="+sph.value+"&from="+spf.value,{method:"get",asynchronous:true,evalScripts:true});
}
}
function show_login_dialog(div,pos){
openPageCover();
Element.show("float_login");
if(pos){
$("float_login").style.left=getPos(div,"Left")+"px";
}else{
$("float_login").style.left=(getPos(div,"Left")-$("float_login").offsetWidth-3)+"px";
}
$("float_login").style.top=getPos(div,"Top")+"px";
}
function show_regdlg_dialog(div,_8b){
openPageCover();
Element.show("regform");
$("regform").style.left=getPos(div,"Left")+"px";
$("regform").style.top=getPos(div,"Top")+"px";
if(_8b){
$("friendster").value="1";
}
}
function showLyric(id,div){
show_loading(div);
new Ajax.Request("/song/show_lyric/"+id,{method:"get",asynchronous:true,evalScripts:true});
}
function idislikethisSong(id,_8f){
new Ajax.Request("/user/add_unfond_song?song_id="+id+"&from="+_8f,{method:"get",asynchronous:true,evalScripts:true});
}
function addFriendAccept(id,div){
show_loading(div);
new Ajax.Request("/friend/accept/"+id,{method:"get",asynchronous:true,evalScripts:true});
}
function addFriendDecline(id,div){
show_loading(div);
new Ajax.Request("/friend/decline/"+id,{method:"get",asynchronous:true,evalScripts:true});
}
function wait(str){
str=str?str:MSG_LOADING;
}
function sendLoginRequest(_95){
email=_95.email;
passphase=_95.passphase;
$("user_useremail").value=email;
$("user_passphase").value=passphase;
$("fm_signon_small").submit();
}
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;
Event.observe(window,"load",function(){
var _96=document.createElement("DIV");
_96.id="yobo_float_music_menu";
_96.style.position="absolute";
_96.style.display="none";
_96.style.width="84px";
_96.style.cursor="pointer";
_96.onmouseover=function(){
_96.style.display="block";
};
_96.onmouseout=function(){
_96.style.display="none";
};
document.body.appendChild(_96);
});
function yobo_song_floatmenu(_97,_98,_99){
var _9a=80;
var _9b=$(_98);
try{
var _9c=$("yobo_float_music_menu");
if(!_9c){
return false;
}
if(!_99){
_9c.hide();
return;
}
var _9d=Position.cumulativeOffset(_97)[0]+$(_97).getWidth()-_9a-10;
var _9e=Position.cumulativeOffset(_97)[1];
_9c.innerHTML=_9b.innerHTML;
var _9f=document.createElement("input");
_9f.type="hidden";
_9f.name="hidden";
_9f.id="yobo_songmenubar_hidden";
_9c.appendChild(_9f);
_9f=document.createElement("input");
_9f.type="hidden";
_9f.name="from";
_9f.id="yobo_songmenubar_from";
_9c.appendChild(_9f);
_9f=document.createElement("input");
_9f.type="hidden";
_9f.name="fr";
_9f.id="yobo_songmenubar_pagefrom";
_9c.appendChild(_9f);
_9c.setStyle({left:_9d+"px",top:_9e+"px"});
_9c.show();
}
catch(e){
}
}
if(typeof (yobo_songPlayer)!="function"){
var yobo_songPlayer=Class.create();
yobo_songPlayer.prototype={initialize:function(){
this.ext_flash=null;
this.win_flash=null;
this.dom_pagebtn=null;
this.is_pagebtn=false;
this.sp_status=YOBO_SP_STATUS_STOP;
this.sp_songlist=[];
this.is_songlist=false;
this.sp_listmethod=YOBO_SL_LOOP_ORDER;
this.sp_listcuridx=0;
this.dom_listouter=null;
this.dom_listprev=null;
this.dom_listplay=null;
this.dom_listnext=null;
this.dom_listorder=null;
this.sp_songurl="nourl";
this.sp_songid=-1;
this.sp_songrnd=-1;
this.dom_songouter=null;
this.dom_songctrl=null;
this.dom_songtable=null;
this.dom_songtime=null;
this.sp_loadtimer=null;
this.sp_looptimer=null;
this.is_init=false;
this.is_upload=false;
},initPlayer:function(){
try{
if(navigator.appName.indexOf("Microsoft")!=-1){
this.ext_flash=window["pagesongplayer"];
this.win_flash=window["finalPlayer"];
}else{
this.ext_flash=document["pagesongplayer"];
this.win_flash=document["finalPlayer"];
}
this.dom_pagebtn=$("yobo_largesongctrlbtn");
this.is_pagebtn=false;
this.sp_status=YOBO_SP_STATUS_STOP;
this.sp_songlist=[];
this.is_songlist=false;
this.sp_listmethod=YOBO_SL_LOOP_ORDER;
this.sp_listcuridx=0;
this.dom_listouter=$("yobo_songctrlbar");
this.dom_listprev=$("yobo_sctrl_prev");
this.dom_listplay=$("yobo_sctrl_play");
this.dom_listnext=$("yobo_sctrl_next");
this.dom_listorder=$("yobo_sctrl_order");
this.sp_songurl="nourl";
this.sp_songid=-1;
this.sp_songrnd=-1;
this.dom_songouter=null;
this.dom_songctrl=null;
this.dom_songtable=null;
this.dom_songtime=null;
this.sp_loadtimer=null;
this.sp_looptimer=null;
this.is_init=true;
this.is_upload=false;
}
catch(e){
traceError("Error initPlayer::initialize -> "+e);
}
},playSong:function(url,sid,rnd,_a3,_a4){
try{
if(this.is_init){
this.is_pagebtn=_a3?true:false;
this.is_songlist=false;
this.startSong(url,sid,rnd,true,_a4);
}
}
catch(e){
traceError("Error yobo_songPlayer::play -> "+e);
}
},playList:function(_a5){
try{
if(this.is_init){
this.is_pagebtn=false;
if(_a5&&_a5.length>0){
this.is_songlist=true;
if(this.sp_songlist==_a5){
this.sp_listcuridx=(this.sp_listcuridx+this.sp_songlist.length)%this.sp_songlist.length;
}else{
this.sp_songlist=_a5;
this.sp_listcuridx=0;
}
var _a6=this.sp_songlist[this.sp_listcuridx];
this.startSong(_a6.url,_a6.sid,_a6.rnd,false,_a6.isup);
}else{
traceError("Error yobo_songPlayer::playList -> invalid list");
}
}
}
catch(e){
traceError("Error yobo_songPlayer::playList -> "+e);
}
},initList:function(_a7){
try{
if(_a7&&_a7.length>0){
this.sp_songlist=_a7;
this.sp_listcuridx=0;
}else{
traceError("Error yobo_songPlayer::playList -> invalid list");
}
}
catch(e){
traceError("Error yobo_songPlayer::initList -> "+e);
}
},updateListMethod:function(){
try{
if(this.is_init){
this.is_songlist=true;
this.sp_listmethod=(this.sp_listmethod+1)%3;
if(this.dom_listouter&&this.dom_listorder){
switch(this.sp_listmethod){
case YOBO_SL_LOOP_BACK:
this.dom_listorder.className="ctrlback";
break;
case YOBO_SL_LOOP_RND:
this.dom_listorder.className="ctrlrnd";
break;
default:
this.dom_listorder.className="ctrlorder";
}
}
}
}
catch(e){
traceError("Error yobo_songPlayer::updateListMethod -> "+e);
}
},stopSong:function(_a8){
try{
if(this.is_init){
clearTimeout(this.sp_loadtimer);
clearTimeout(this.sp_looptimer);
this.sp_status=YOBO_SP_STATUS_STOP;
try{
this.ext_flash.close();
}
catch(e){
traceError("Error yobo_songPlayer::stopSong(EXT) -> "+e);
}
if(this.dom_pagebtn){
this.dom_pagebtn.className="frameplay";
}
if(this.dom_songouter&&this.dom_songctrl&&this.dom_songtime&&this.dom_songtable){
this.dom_songctrl.className="ybscontrol";
this.dom_songtime.innerHTML="00:00";
this.dom_songtable.style.backgroundPosition=(this.dom_songtable.offsetWidth-614)+"px 0px";
}
if(this.dom_listouter&&this.dom_listplay&&this.is_songlist){
this.dom_listplay.className="ctrlplay";
}
this.dom_songouter=null;
this.dom_songctrl=null;
this.dom_songtable=null;
this.dom_songtime=null;
if(!_a8){
if(this.is_songlist){
this.playNext();
}else{
this.loadSong(this.sp_songurl,this.sp_songid,this.sp_songrnd,this.is_upload);
}
}
}
}
catch(e){
traceError("Error yobo_songPlayer::stopSong -> "+e);
}
},playNext:function(){
try{
if(this.is_init){
if(this.getNextIndex(true)){
this.is_songlist=true;
var _a9=this.sp_songlist[this.sp_listcuridx];
this.startSong(_a9.url,_a9.sid,_a9.rnd,false,_a9.isup);
}
}
}
catch(e){
traceError("Error yobo_songPlayer::playNext -> "+e);
}
},playPrev:function(){
try{
if(this.is_init){
if(this.getNextIndex(false)){
this.is_songlist=true;
var _aa=this.sp_songlist[this.sp_listcuridx];
this.startSong(_aa.url,_aa.sid,_aa.rnd,false,_aa.isup);
}
}
}
catch(e){
traceError("Error yobo_songPlayer::playPrev -> "+e);
}
},startSong:function(url,sid,rnd,_ae,_af){
try{
if(this.is_init){
if(url==this.sp_songurl&&sid==this.sp_songid&&rnd==this.sp_songrnd){
switch(this.sp_status){
case YOBO_SP_STATUS_STOP:
this.loadSong(this.sp_songurl,this.sp_songid,this.sp_songrnd,this.is_upload);
break;
case YOBO_SP_STATUS_LOAD:
break;
case YOBO_SP_STATUS_PLAY:
this.pauseSong();
break;
case YOBO_SP_STATUS_PAUSE:
this.resumeSong();
break;
default:
traceError("Error yobo_songPlayer::playList -> unknown status: "+this.sp_status);
}
}else{
if(_ae){
this.sp_listcuridx=this.getIndexInList(url,sid,rnd);
}
if(this.sp_status!=YOBO_SP_STATUS_STOP){
this.stopSong(true);
}
if(url==""||url=="-1"){
show_oninvaildsongurl(sid);
return false;
}else{
this.loadSong(url,sid,rnd,_af);
}
}
}
}
catch(e){
traceError("Error yobo_songPlayer::startSong -> "+e);
}
},loadSong:function(url,sid,rnd,_b3){
try{
if(this.is_init){
clearTimeout(this.sp_loadtimer);
clearTimeout(this.sp_looptimer);
if(this.sp_status==YOBO_SP_STATUS_STOP){
this.sp_status=YOBO_SP_STATUS_LOAD;
if(this.win_flash){
try{
this.win_flash.PauseMP3();
}
catch(e){
traceError("Error yobo_songPlayer::loadSong(WIN) -> "+e);
}
}
this.dom_songouter=$("ybs"+sid+rnd);
this.dom_songctrl=$("ybs"+sid+rnd+"_ctrl");
this.dom_songtable=$("ybs"+sid+rnd);
this.dom_songtime=$("ybs"+sid+rnd+"_time");
if(this.dom_songouter&&this.dom_songctrl&&this.dom_songtable&&this.dom_songtime){
this.sp_songurl=url;
this.sp_songid=sid;
this.sp_songrnd=rnd;
this.is_upload=_b3;
this.dom_songctrl.className="ybscontrolpause";
if(this.dom_pagebtn&&this.is_pagebtn){
this.dom_pagebtn.className="framepause";
}
if(this.dom_listouter&&this.dom_listplay&&this.is_songlist){
this.dom_listplay.className="ctrlstop";
}
try{
this.ext_flash.start(this.sp_songurl);
}
catch(e){
traceError("Error yobo_songPlayer::loadSong(EXT) -> "+e);
}
var _b4=this;
this.sp_loadtimer=setTimeout(function(){
_b4.loadTimeout();
},30*1000);
this.sp_looptimer=setTimeout(function(){
_b4.loopSong();
},700);
show_loading(this.dom_songctrl);
try{
pageTracker._trackPageview("/ajax/song_bar/play");
}
catch(e){
}
}else{
this.removeFromList(url,sid,rnd);
this.stopSong(!this.is_songlist);
}
}
}
}
catch(e){
traceError("Error yobo_songPlayer::loadSong -> "+e);
}
},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:ERROR_GENERAL_MSG,li:[ERROR_LOADSONG_TIMEOUT],type:"alert",className:"error"});
this.stopSong(!this.is_songlist);
}
}
catch(e){
traceError("Error yobo_songPlayer::loadTimeout -> "+e);
}
},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);
if(off>1){
if(this.sp_status==YOBO_SP_STATUS_LOAD){
clearTimeout(this.sp_loadtimer);
this.sp_status=YOBO_SP_STATUS_PLAY;
hide_loading();
if(this.sp_songid!=-1&&!this.is_upload){
new Ajax.Request("/player/write_log?song_id="+this.sp_songid+"&flag=1",{method:"get",asynchronous:true,evalScripts:true});
}
}
var len=this.dom_songtable.offsetWidth*(pos/dur)-614;
this.dom_songtable.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.dom_songtime.innerHTML=dm+":"+ds;
}else{
if(this.sp_status!=YOBO_SP_STATUS_STOP&&this.sp_status!=YOBO_SP_STATUS_LOAD){
if(this.sp_songid!=-1&&!this.is_upload){
new Ajax.Request("/player/write_log?song_id="+this.sp_songid+"&flag=0",{method:"get",asynchronous:true,evalScripts:true});
try{
pageTracker._trackPageview("/ajax/song_bar/play_finish");
}
catch(e){
}
}
this.stopSong(false);
}
}
var _bb=this;
this.sp_looptimer=setTimeout(function(){
_bb.loopSong();
},700);
}
}
catch(e){
traceError("Error yobo_songPlayer::loopSong -> "+e);
}
},pauseSong:function(){
try{
if(this.is_init){
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){
traceError("Error yobo_songPlayer::pauseSong(EXT) -> "+e);
}
if(this.dom_pagebtn&&this.is_pagebtn){
this.dom_pagebtn.className="frameplay";
}
if(this.dom_songouter&&this.dom_songctrl){
this.dom_songctrl.className="ybscontrolplay";
}
if(this.dom_listouter&&this.dom_listplay&&this.is_songlist){
this.dom_listplay.className="ctrlplay";
}
}
}
}
catch(e){
traceError("Error yobo_songPlayer::pauseSong -> "+e);
}
},resumeSong:function(){
try{
if(this.is_init){
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){
traceError("Error yobo_songPlayer::resumeSong(EXT) -> "+e);
}
if(this.dom_pagebtn&&this.is_pagebtn){
this.dom_pagebtn.className="framepause";
}
if(this.dom_songouter&&this.dom_songctrl){
this.dom_songctrl.className="ybscontrolpause";
}
if(this.dom_listouter&&this.dom_listplay&&this.is_songlist){
this.dom_listplay.className="ctrlstop";
}
var _bc=this;
this.sp_looptimer=setTimeout(function(){
_bc.loopSong();
},700);
}
}
}
catch(e){
traceError("Error yobo_songPlayer::resumeSong -> "+e);
}
},getNextIndex:function(_bd){
try{
if(this.sp_songlist&&this.sp_songlist.length>0){
switch(this.sp_listmethod){
case YOBO_SL_LOOP_BACK:
if(_bd){
this.sp_listcuridx--;
}else{
this.sp_listcuridx++;
}
break;
case YOBO_SL_LOOP_RND:
this.sp_listcuridx=Math.floor(Math.random()*this.sp_songlist.length);
break;
default:
if(_bd){
this.sp_listcuridx++;
}else{
this.sp_listcuridx--;
}
}
this.sp_listcuridx=(this.sp_listcuridx+this.sp_songlist.length)%this.sp_songlist.length;
return true;
}else{
return false;
}
}
catch(e){
traceError("Error yobo_songPlayer::getNextIndex -> "+e);
return false;
}
},getIndexInList:function(url,sid,rnd){
try{
if(this.sp_songlist&&this.sp_songlist.length>0){
for(var i=0;i<this.sp_songlist.length;i++){
var _c2=this.sp_songlist[i];
if(_c2.url==url&&_c2.sid==sid&&_c2.rnd==rnd){
return i;
}
}
}else{
return 0;
}
}
catch(e){
traceError("Error yobo_songPlayer::getIndexInList -> "+e);
return 0;
}
},removeFromList:function(url,sid,rnd){
try{
if(this.sp_songlist&&this.sp_songlist.length>0){
for(var i=0;i<this.sp_songlist.length;i++){
var _c7=this.sp_songlist[i];
if(_c7.url==url&&_c7.sid==sid&&_c7.rnd==rnd){
this.sp_listcuridx.splice(i,1);
if(this.sp_listcuridx>=i){
this.sp_listcuridx--;
}
return true;
}
}
}
return false;
}
catch(e){
traceError("Error yobo_songPlayer::getIndexInList -> "+e);
return false;
}
}};
}
var SONG_PLAYER_ITEM=new yobo_songPlayer();
function yobo_init_pageplayer(){
SONG_PLAYER_ITEM.initPlayer();
}
function yobo_play_song(u,s,r,f,iu){
try{
if(!yb_login){
show_logindlg("normal");
return false;
}
}
catch(e){
alert(e);
}
SONG_PLAYER_ITEM.playSong(u,s,r,f,iu);
try{
pageTracker._trackPageview("/ajax/song_bar/play");
}
catch(e){
}
}
function yobo_play_list(l){
SONG_PLAYER_ITEM.playList(l);
try{
pageTracker._trackPageview("/ajax/song_bar/play_list");
}
catch(e){
}
}
function yobo_init_list(l){
SONG_PLAYER_ITEM.initList(l);
}
function yobo_play_listprev(){
SONG_PLAYER_ITEM.playPrev();
try{
pageTracker._trackPageview("/ajax/song_bar/prev_song");
}
catch(e){
}
}
function yobo_play_listnext(){
SONG_PLAYER_ITEM.playNext();
try{
pageTracker._trackPageview("/ajax/song_bar/next_song");
}
catch(e){
}
}
function yobo_update_listmethod(){
SONG_PLAYER_ITEM.updateListMethod();
}
function yobo_flashcallback_play(){
SONG_PLAYER_ITEM.stopSong(true);
}
function yobo_play_stop(){
SONG_PLAYER_ITEM.stopSong(true);
}
if(typeof (yobo_songPlayerLite)!="function"){
var yobo_songPlayerLite=Class.create();
yobo_songPlayerLite.prototype={initialize:function(){
try{
this.flash=null;
this.status=0;
this.url=null;
this.songid=null;
this.randnum=null;
this.controls=null;
this.songlink=null;
this.is_init=false;
}
catch(e){
traceError("Error yobo_songPlayerLite::initialize -> "+e);
return false;
}
},initPlayer:function(){
try{
this.flash=window["pagesongplayer"]?window["pagesongplayer"]:document["pagesongplayer"];
this.status=0;
this.url=null;
this.songid=null;
this.randnum=null;
this.controls=null;
this.songlink=null;
this.is_init=true;
}
catch(e){
traceError("Error yobo_songPlayerLite::initPlayer -> "+e);
return false;
}
},play:function(url,sid,rnd,_d2,_d3){
try{
if(this.is_init){
if(this.url==url&&this.songid==sid&&this.randnum==rnd){
switch(this.status){
case 0:
this.loadSong(url,sid,rnd,_d2,_d3);
break;
case 1:
break;
case 2:
this.pause();
break;
case 3:
this.resume();
break;
default:
alert(ERROR_BAD_STATUS+this.status);
}
}else{
if(this.status>0){
this.controls.innerHTML="Play";
this.stopAll();
}
if(url==""||url=="-1"){
show_oninvaildsongurl(sid);
return false;
}else{
this.loadSong(url,sid,rnd,_d2,_d3);
}
}
}
}
catch(e){
traceError("Error yobo_songPlayerLite::play -> "+e);
return false;
}
},loadSong:function(url,sid,rnd,_d7,_d8){
try{
if(this.is_init){
this.status=1;
clearTimeout(this.loadtimer);
clearTimeout(this.looptimer);
this.url=url;
this.songid=sid;
this.randnum=rnd;
this.controls=$(_d7);
this.songlink=$(_d8);
this.controls.innerHTML="<img src=\"/images/icons/songbar_pause.gif\" align=\"absmiddle\" />";
this.songurl=url;
var _d9=this;
setTimeout(function(){
_d9.flash.start(_d9.songurl);
},0);
this.loadtimer=setTimeout(function(){
clearTimeout(this.loadtimer);
clearTimeout(this.looptimer);
if(_d9.status<2){
_d9.controls.innerHTML="Play";
printE({title:ERROR_GENERAL_MSG,li:[ERROR_LOADSONG_TIMEOUT],type:"alert",className:"error"});
_d9.stopAll();
}
},1000*30);
this.looptimer=setTimeout(function(){
_d9.loop();
},100);
show_loading(this.controls);
if(this.songid!=-1){
new Ajax.Request("/player/write_log?song_id="+this.songid+"&flag=1",{method:"get",asynchronous:true,evalScripts:true});
}
}
}
catch(e){
traceError("Error yobo_songPlayerLite::loadSong -> "+e);
return false;
}
},stop:function(){
try{
if(this.is_init){
this.status=0;
clearTimeout(this.loadtimer);
clearTimeout(this.looptimer);
var _da=this;
setTimeout(function(){
_da.flash.close();
},0);
this.loadSong(this.url,this.songid,this.randnum,this.controls,this.songlink);
}
}
catch(e){
traceError("Error yobo_songPlayerLite::stop -> "+e);
return false;
}
},loop:function(){
try{
clearTimeout(this.looptimer);
if(this.status>0&&this.status<3){
var dur=Math.floor(parseInt(this.flash.getDur())/1000);
var pos=Math.floor(parseInt(this.flash.getPosi())/1000);
var off=dur-pos;
if(off>0){
if(this.status==1){
clearTimeout(this.loadtimer);
this.status=2;
hide_loading();
}
var len=this.songlink.offsetWidth*(pos/dur)-614;
this.songlink.style.background="url(/images/progressbar.gif) "+len+"px center no-repeat";
}else{
if(this.status>1){
if(this.songid!=-1){
new Ajax.Request("/player/write_log?song_id="+this.songid+"&flag=0",{method:"get",asynchronous:true,evalScripts:true});
}
this.controls.innerHTML="Play";
this.stop();
}
}
var _df=this;
this.looptimer=setTimeout(function(){
_df.loop();
},200);
}
}
catch(e){
traceError("Error yobo_songPlayerLite::loop -> "+e);
return false;
}
},pause:function(){
try{
if(this.is_init){
if(this.status==2){
clearTimeout(this.looptimer);
this.status=3;
this.controls.innerHTML="<img src=\"/images/icons/songbar_play.gif\" align=\"absmiddle\" />";
var _e0=this;
setTimeout(function(){
_e0.flash.pause();
},0);
}
}
}
catch(e){
traceError("Error yobo_songPlayerLite::pause -> "+e);
return false;
}
},resume:function(){
try{
if(this.is_init){
if(this.status==3){
clearTimeout(this.looptimer);
this.status=2;
this.controls.innerHTML="<img src=\"/images/icons/songbar_pause.gif\" align=\"absmiddle\" />";
var _e1=this;
setTimeout(function(){
_e1.flash.resume();
},0);
this.looptimer=setTimeout(function(){
_e1.loop();
},200);
}
}
}
catch(e){
traceError("Error yobo_songPlayerLite::resume -> "+e);
return false;
}
},stopAll:function(){
try{
if(this.is_init){
this.status=0;
clearTimeout(this.loadtimer);
clearTimeout(this.looptimer);
if(this.songlink&&this.controls){
this.songlink.style.background="url(/images/progressbar.gif) "+(this.songlink.offsetWidth-614)+"px center no-repeat";
}
var _e2=this;
setTimeout(function(){
_e2.flash.close();
},0);
this.url=null;
this.songid=null;
this.randnum=null;
this.controls=null;
this.songlink=null;
}
}
catch(e){
traceError("Error yobo_songPlayerLite::stopAll -> "+e);
return false;
}
}};
}
var SONG_PLAYER_LITE=new yobo_songPlayerLite();
function yobo_init_liteplayer(){
SONG_PLAYER_LITE.initPlayer();
}
function yobo_play_lite(u,s,r,c,b){
SONG_PLAYER_LITE.play(u,s,r,c,b);
}
var yobo_vSliderLock=false;
var yobo_vSliderStack=[];
var yobo_vSliderList=[];
if(typeof (yobo_vSlider)!="function"){
var yobo_vSlider=Class.create();
yobo_vSlider.prototype={initialize:function(id,_e9){
this.id=id;
this.slider=$(id);
this.topbar=$(id+"_top");
this.float2=$(id+"_float");
this.input=$(id+"_input");
this.onchange=_e9;
this.flag=false;
if(this.slider&&this.topbar&&this.float2&&this.input){
this.btnoffset=Math.floor(this.float2.offsetHeight/2);
this.miny=0;
this.maxy=this.slider.offsetHeight;
this.rangey=this.maxy-this.float2.offsetHeight;
this.rank=100;
this.offsettop=getPos(this.slider,"Top");
this.inneroffset=0;
this.initButtonPos();
this.attevt();
this.old=this.input.value;
}
},attevt:function(){
Event.observe(this.slider,"mousedown",this.outerMouseDown.bindAsEventListener(this));
Event.observe(document,"mousemove",this.outerMouseMove.bindAsEventListener(this));
Event.observe(this.float2,"mousedown",this.buttonMouseDown.bindAsEventListener(this));
Event.observe(document,"mouseup",this.outerMouseUp.bindAsEventListener(this));
},outerMouseDown:function(e){
if(!this.flag){
this.old=this.input.value;
var y=Event.pointerY(e);
y=y-this.offsettop-this.btnoffset;
this.setButtonPos(y);
if(this.old!=this.input.value){
if(this.onchange){
this.onchange(this.input.name,this.input.value);
}
yobo_vSlider_pushStack(this,this.old,1);
}
}
},outerMouseMove:function(e){
if(this.flag){
var y=Event.pointerY(e);
y=y-this.offsettop-this.inneroffset;
this.setButtonPos(y);
}
},buttonMouseDown:function(e){
this.flag=true;
yobo_vSliderLock=true;
this.old=this.input.value;
this.inneroffset=Event.pointerY(e)-this.offsettop-parseInt(this.float2.style.top);
document.body.onselectstart=function(){
return false;
};
document.body.style.cursor="pointer";
},outerMouseUp:function(){
var oc=false;
if(this.flag){
document.body.onselectstart=function(){
return true;
};
document.body.style.cursor="";
if(this.old!=this.input.value){
oc=true;
}
}
this.flag=false;
yobo_vSliderLock=false;
if(oc){
if(this.onchange){
this.onchange(this.input.name,this.input.value);
}
yobo_vSlider_pushStack(this,this.old,2);
}
},initButtonPos:function(){
var _f0=this.rank-this.input.value;
var _f1=Math.floor(_f0*this.rangey/this.rank);
var _f2=Math.floor(_f0*this.maxy/this.rank);
this.topbar.style.height=_f2+"px";
this.float2.style.top=_f1+"px";
},setButtonPos:function(oy){
oy=Math.max(this.miny,oy);
oy=Math.min(this.rangey,oy);
var _f4=Math.floor(oy*this.rank/this.rangey);
this.input.value=this.rank-_f4;
this.topbar.style.height=(oy+this.btnoffset)+"px";
this.float2.style.top=oy+"px";
},undoPos:function(py){
this.input.value=py;
py=this.rank-py;
var _f6=Math.floor(py*this.rangey/this.rank);
var _f7=Math.floor(py*this.maxy/this.rank);
this.topbar.style.height=_f7+"px";
this.float2.style.top=_f6+"px";
this.old=this.input.value;
if(this.onchange){
this.onchange(this.input.name,this.input.value);
}
},resetPos:function(py){
this.input.value=py;
py=this.rank-py;
var _f9=Math.floor(py*this.rangey/this.rank);
var _fa=Math.floor(py*this.maxy/this.rank);
this.topbar.style.height=_fa+"px";
this.float2.style.top=_f9+"px";
this.old=this.input.value;
}};
}
function yobo_vSlider_pushStack(_fb,_fc,_fd){
yobo_vSliderStack.push({s:_fb,v:_fc});
if($("yobo_vSliderUndoBtn")){
Element.show("yobo_vSliderUndoBtn");
}
if($("yobo_vSliderResetBtn")){
Element.show("yobo_vSliderResetBtn");
}
}
function yobo_vSlider_popStack(){
if(yobo_vSliderStack.length==0){
if($("yobo_vSliderUndoBtn")){
Element.hide("yobo_vSliderUndoBtn");
}
}else{
var itm=yobo_vSliderStack.pop();
itm.s.undoPos(itm.v);
if(yobo_vSliderStack.length==0){
if($("yobo_vSliderUndoBtn")){
Element.hide("yobo_vSliderUndoBtn");
}
}
}
}
function yobo_vSlider_clearStack(_ff){
yobo_vSliderStack=null;
yobo_vSliderStack=[];
if($("yobo_vSliderUndoBtn")){
Element.hide("yobo_vSliderUndoBtn");
}
if($("yobo_vSliderResetBtn")){
Element.hide("yobo_vSliderResetBtn");
}
for(var i=yobo_vSliderList.length-1;i>=0;i--){
var itm=yobo_vSliderList[i];
itm.resetPos(50);
}
if(_ff){
_ff();
}
}
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;
function htmltag_escape(str){
var tmp=str.replace("<","&lt;");
tmp=tmp.replace(">","&gt;");
return tmp;
}
function findNextNode(_104,_105){
if(!_104){
return null;
}
while(_104.nextSibling){
if(_104.nextSibling.nodeType==_105){
return _104.nextSibling;
}
_104=_104.nextSibling;
}
return null;
}
function findPreviousNode(_106,_107){
if(!_106){
return null;
}
while(_106.previousSibling){
if(_106.previousSibling.nodeType==_107){
return _106.previousSibling;
}
_106=_106.previousSibling;
}
return null;
}
function setAttr(el,attr,_10a){
var obj=$(el);
if(!obj){
return false;
}
try{
obj.setAttribute(attr,_10a);
return true;
}
catch(e){
return false;
}
}
function getAttr(el,attr){
if(typeof (el)=="string"){
var obj=$(el);
}else{
var obj=el;
}
if(!obj){
return null;
}
try{
return obj.getAttribute(attr);
}
catch(e){
return null;
}
}
function getPos(el,_110){
el=$(el);
var iPos=0;
while(el!=null){
iPos+=el["offset"+_110];
el=el.offsetParent;
}
return iPos;
}
function getPageOffsetY(){
var _112=0;
if(UA=="ie"||UA=="ie7"){
_112=document.documentElement.scrollTop;
}else{
_112=pageYOffset;
}
return _112;
}
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 clip=Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard);
if(!clip){
return;
}
var _115=Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);
if(!_115){
return;
}
_115.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 _118=txt;
str.data=_118;
_115.setTransferData("text/unicode",str,_118.length*2);
var _119=Components.interfaces.nsIClipboard;
if(!_119){
return;
}
clip.setData(_115,null,_119.kGlobalClipboard);
}
}
}
}
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 closePageCover(){
before_showfloatdialog();
}
function before_showfloatdialog(){
try{
var _11c=[["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<_11c.length;i++){
var dlg=$(_11c[i][0]);
var clr=_11c[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 g_selectAllCheckbox(tar,form,ckid,_124){
var fm=$(form);
if(ckid){
var cl=fm[ckid];
}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,_12a){
el.checked=ck;
});
}else{
cl.checked=ck;
}
if(_124){
_124.checked=ck;
}
}
return true;
}
function g_removeAllCheckbox(tar,all){
var acb=$(all);
if(acb){
if(!tar.checked){
acb.checked=false;
}
}
}
function yobo_sigonout(){
new Ajax.Request("/signout/logout",{method:"get",asynchronous:true,evalScripts:true});
}
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 left=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=(left-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 show_floatdialog(_135,top){
var fd=$("yobo_floatdialog");
var yb=$("yobo");
if(fd&&yb){
hide_mainplayer();
var wd=_135+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 printE(_13d){
show_printEdialog(_13d);
}
function openURL(url){
window.location.href=url;
}
function show_printEdialog(_13f){
if(!_13f.showall){
before_showfloatdialog();
}
var dlg=$("yobo_printEdialog");
var tit=$("yobo_printEdialog_title");
var cnt=$("yobo_printEdialog_content");
var btn1=$("yobo_printEdialog_okbtn");
var btn2=$("yobo_printEdialog_funcbtn");
var btn3=$("yobo_printEdialog_cancelbtn");
if(dlg&&tit&&cnt&&btn1&&btn2&&btn3){
try{
if(PRINTEDIALOG_AUTOHIDE_TIMER){
clearTimeout(PRINTEDIALOG_AUTOHIDE_TIMER);
}
var _146=_13f.title?_13f.title:ERROR_GENERAL_MSG;
var type=_13f.type?_13f.type:"alert";
var _148=_13f.className?_13f.className:"error";
var _149=_13f.onclick?_13f.onclick:"";
var _14a=_13f.li?_13f.li:ERROR_PRINTE_MSG;
tit.innerHTML=_146;
var ct="";
_14a.each(function(el,_14d){
ct+="<li>"+el+"</li>";
});
cnt.innerHTML=ct;
if(type=="alert"){
Element.show(btn1);
Element.hide(btn2);
Element.hide(btn3);
btn1.onclick=function(){
hide_printEdialog(!_13f.showall);
return false;
};
autohide_printEdialog(3,!_13f.showall);
}else{
Element.hide(btn1);
Element.show(btn2);
Element.hide(btn3);
btn2.onclick=function(){
eval(_149);
hide_printEdialog(!_13f.showall);
return false;
};
}
dlg.style.top=getPageOffsetY()+250+"px";
dlg.style.left=$("yobo").offsetLeft+260+"px";
Element.show(dlg);
if(type=="alert"){
btn1.focus();
}else{
btn2.focus();
}
}
catch(e){
alert(e);
}
}
}
function hide_printEdialog(_14e){
if(PRINTEDIALOG_AUTOHIDE_TIMER){
clearTimeout(PRINTEDIALOG_AUTOHIDE_TIMER);
}
var dlg=$("yobo_printEdialog");
var ctxt=$("yobo_printEdialog_closeinfo");
if(dlg&&ctxt){
Element.hide(dlg);
ctxt.innerHTML="";
}
if(_14e){
show_mainplayer();
}
}
function autohide_printEdialog(idx,_152){
if(PRINTEDIALOG_AUTOHIDE_TIMER){
clearTimeout(PRINTEDIALOG_AUTOHIDE_TIMER);
}
if(idx==0){
var dlg=$("yobo_printEdialog");
if(dlg){
Element.hide(dlg);
}
if(_152){
show_mainplayer();
}
}else{
var ctxt=$("yobo_printEdialog_closeinfo");
if(ctxt){
Element.show(ctxt);
ctxt.innerHTML="("+idx+MSG_PRINTEAUTOHIDETEXT+")";
PRINTEDIALOG_AUTOHIDE_TIMER=setTimeout("autohide_printEdialog("+(idx-1)+", "+_152+")",700);
}
}
}
function initPageInterface(){
var _155=null;
if(navigator.appName.indexOf("Microsoft")!=-1){
_155=window["pagesongplayer"];
}else{
_155=document["pagesongplayer"];
}
if(_155&&typeof (_155.close)=="function"){
yobo_init_pageplayer();
}else{
Event.observe(window,"load",yobo_init_pageplayer.bindAsEventListener(window));
}
}
function initMenuEvent(_156,_157){
var item=$(_156);
var _159=$(_156+"block");
if(_157){
var hide=$(_157+"block");
Element.show(hide);
}
if(item&&_159){
item.onmouseover=_159.onmouseover=function(){
item.className="itemlinkcur";
Element.show(_159);
if(_157){
Element.hide(hide);
}
};
item.onmouseout=_159.onmouseout=function(){
item.className="itemlink";
Element.hide(_159);
if(_157){
Element.show(hide);
}
};
}
}
function traceError(str){
var db=$("yobo_debug");
if(db){
db.innerHTML=db.innerHTML+str+"<br />";
}
}
function show_oninvaildsongurl(sid){
var dlg=$("songbar_nourldialog");
var dlk=$("sbardlg_link");
var yb=$("yobo");
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 input_onfocusclear(ipt){
for(var i=MSG_INPUTVALUEDEFAULT.length-1;i>=0;i--){
if(ipt.value==MSG_INPUTVALUEDEFAULT[i]){
ipt.value="";
}
}
ipt.style.color="#333333";
ipt.select();
}
function input_onblur(ipt){
if(ipt.value==""){
ipt.value=MSG_INPUTVALUEDEFAULT[11];
}
ipt.style.color="";
}
function uf_friendrecommend(fid,div){
var top=150;
show_loading(div);
new Ajax.Request("/recommend/friend_recommend?friend_id="+fid+"&top="+top,{asynchronous:true,evalScripts:true});
}
function uf_onSearchSong(div){
var q=$("rsdialog_keyword");
if(q){
if(q.value.length==0){
alert(ERROR_EMPTY_SONG_NAME);
}else{
show_loading(div);
new Ajax.Request("/recommend/search_song/",{method:"post",parameters:"q="+q.value,asynchronous:true,evalScripts:true});
}
}
}
function uf_sendgift(div){
var top=getPos(div,"Top");
show_loading(div);
new Ajax.Request("/recommend/send_gift"+"?top="+top,{asynchronous:true,evalScripts:true});
}
function uf_showsendmessage(_16f,fid,div,wid,cont){
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+_16f;
if(cont){
dct.innerHTML=cont;
}
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_clearsendmessage(){
var cnt=$("yobo_sendmessage_dialogcontent");
if(cnt){
cnt.value=MSG_INPUTVALUEDEFAULT[0];
}
}
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 recommend_song(sid){
show_recommendsong(sid);
}
function show_recommendsong(sid,div,_184){
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 _187="";
if(_184){
_187="&song_file_id="+_184;
}
new Ajax.Request("/recommend/recommend?song_id="+sid+"&top=170&fr="+pfm.value+_187,{method:"get",asynchronous:true,evalScripts:true});
}
}
function feedback_fondsong(sid){
show_addtobox(sid,null,null);
}
function show_addtobox(sid,div,from,_18c){
var pfm=$("yobo_songmenubar_pagefrom");
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 _190="";
if(_18c){
_190="&song_file_id="+_18c;
}
show_loading(div);
new Ajax.Request("/box/fond/"+sid+"?from="+from+"&fr="+pfm.value+_190,{method:"get",asynchronous:true,evalScripts:true});
}
}
function single_song_player(sid){
show_singlewidget(sid);
}
function show_singlewidget(sid,div,_194){
var sph=$("yobo_songmenubar_hidden");
var pfm=$("yobo_songmenubar_pagefrom");
if(sph&&pfm){
if(!sid){
sid=sph.value;
}
if(div){
show_loading(div);
}
var _197="";
if(_194){
_197="&song_file_id="+_194;
}
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+_197,{method:"get",asynchronous:true,evalScripts:true});
}
}
function feedback_unfondsong(sid){
show_dislikesong(sid);
}
function show_dislikesong(sid,div,from,_19c){
var pfm=$("yobo_songmenubar_pagefrom");
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 _1a0="";
if(_19c){
_1a0="&song_file_id="+_19c;
}
}
show_loading(div);
new Ajax.Request("/user/add_unfond_song?song_id="+sid+"&from="+from+"&fr="+pfm.value+_1a0,{method:"get",asynchronous:true,evalScripts:true});
}
}
function ontextareachange(area,txt,_1a3){
if(!_1a3){
_1a3=200;
}
if(area&&txt){
var len=area.value.length;
var rst=Math.max(0,(_1a3-len));
txt.innerHTML="("+MSG_COMMENTREPLYLEFT+rst+MSG_COMMENTREPLYRIGHT+")";
if(len>_1a3){
area.value=area.value.substr(0,_1a3);
alert(MSG_COMMENTREPLYMAXLENLEFT+_1a3+MSG_COMMENTREPLYMAXLENRIGHT);
return false;
}
}
return true;
}
function show_sp(sid,div,fr){
before_showfloatdialog();
show_loading(div);
var top=getPageOffsetY()+150;
new Ajax.Request("/sp/index/"+sid+"?top="+top+"&fr="+fr,{method:"get",asynchronous:true,evalScripts:true});
}
function show_cai_ring(sid,div,_1ac,fr){
if(_1ac){
before_showfloatdialog();
}
show_loading(div);
var top=getPageOffsetY()+150;
new Ajax.Request("/sp/cai_ring/"+sid+"?top="+top+"&fr="+fr,{method:"get",asynchronous:true,evalScripts:true});
}
function show_ivr(sid,div,_1b1,fr){
if(_1b1){
before_showfloatdialog();
}
show_loading(div);
var top=getPageOffsetY()+150;
new Ajax.Request("/sp/ivr/"+sid+"?top="+top+"&fr="+fr,{method:"get",asynchronous:true,evalScripts:true});
}
function show_zhen_ring(sid,div,_1b6,fr){
if(_1b6){
before_showfloatdialog();
}
show_loading(div);
var top=getPageOffsetY()+150;
new Ajax.Request("/sp/zhen_ring/"+sid+"?top="+top+"&fr="+fr,{method:"get",asynchronous:true,evalScripts:true});
}
function hide_songmenubtn(_1b9){
var btn=$(_1b9+"_menu");
var lst=$(_1b9+"_list");
if(btn&&lst){
if(lst.style.display!=""){
Element.hide(btn);
}
}
}
function show_songmenu(_1bc){
var div=$(_1bc);
var btn=$(_1bc+"_menu");
var lst=$(_1bc+"_list");
if(div&&btn&&lst){
var top=getPos(div,"Top")+19;
var left=getPos(div,"Left")+div.offsetWidth-57;
lst.style.left=left+"px";
lst.style.top=top+"px";
Element.show(btn);
Element.show(lst);
}
}
function hide_songmenu(_1c2){
var btn=$(_1c2+"_menu");
var lst=$(_1c2+"_list");
if(btn&&lst){
Element.hide(btn);
Element.hide(lst);
}
}
function change_friendlist(_1c5,sel,top){
var gid=sel.value;
show_loading(sel);
new Ajax.Request("/recommend/recommend?song_id="+_1c5+"&is_page=1"+"&gid="+gid+"&top="+top,{asynchronous:true,evalScripts:true,method:"post"});
}
function show_friendrequest(div,fid,_1cb){
var dlg=$("yobo_friendrequest");
var tit=$("yobo_friendrequest_title");
var hid=$("yobo_friendrequest_hidden");
if(dlg&&hid&&tit){
before_showfloatdialog();
tit.innerHTML=MSG_FRIENDREQUESTLEFT+_1cb+MSG_FRIENDREQUESTRIGHT;
hid.value=fid;
var top=getPos(div,"Top");
var left=getPos(div,"Left");
dlg.style.left=left+"px";
dlg.style.top=top+"px";
Element.show(dlg);
focuFirstInput(dlg);
}
}
function onsubmit_friendrequest(){
var cnt=$("yobo_friendrequest_content");
var smt=$("yobo_friendrequest_submit");
if(cnt&&smt){
if(cnt.value.length==0){
alert(ERROR_NO_FRIENDREQMESSAGE);
}else{
if(cnt.value.length>200){
alert(ERROR_GROUPSENDMSGTOALL_MAX);
}else{
show_loading(smt);
return true;
}
}
}
return false;
}
function onselect_selectobject(sel,name,_1d5){
var tit=$(sel+"_title");
var hid=$(sel+"_hidden");
var smt=$(sel+"_submit");
if(tit){
tit.innerHTML=name;
}
if(hid){
hid.value=_1d5;
}
if(smt){
smt.click();
}
}
function onclick_editselectobject(sel){
var hid=$(sel+"_hidden");
if(hid){
hid.select();
}
}
function onresize_image(w,div){
var _1dd=document;
if(div){
_1dd=document.getElementById(div);
}
var list=_1dd.getElementsByTagName("img");
for(var i=0;i<list.length;i++){
var img=list[i];
var wo=img.width;
var ho=img.height;
if(wo>w){
img.width=w;
if(ho&&ho>0){
img.height=Math.floor(ho*w/wo);
}
}
}
}
function resizeImg(img,w){
var wo=img.width;
var ho=img.height;
if(wo>w){
img.width=w;
}
}
function uf_onlisttoggle(idx,fid,type){
var btn1=$("uf_listmorebtn_"+idx+"_"+fid);
var btn2=$("uf_listlessbtn_"+idx+"_"+fid);
var _1ec=$("uf_listmoreinfo_"+idx+"_"+fid);
var _1ed=$("uf_listlessinfo_"+idx+"_"+fid);
if(btn1&&btn2&&_1ec&&_1ed){
if(type){
Element.hide(btn1);
Element.show(btn2);
Element.show(_1ec);
Element.hide(_1ed);
}else{
Element.show(btn1);
Element.hide(btn2);
Element.hide(_1ec);
Element.show(_1ed);
}
}
}
function ix_onSearchSong(from,div){
var q=$("ix_searchsong_keyword");
if(q){
if(q.value.length==0){
alert(ERROR_EMPTY_SONG_NAME);
}else{
show_loading(div);
new Ajax.Request("/so/search_song/",{method:"post",parameters:"q="+q.value+"&from="+from,asynchronous:true,evalScripts:true});
}
}
return false;
}
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 sp_widget_showcode(idx){
var tb1=$("sp_widget_tablink1");
var tb2=$("sp_widget_tablink2");
var ctb=$("sp_widget_tablink"+idx);
var ta1=$("single_player_code1");
var ta2=$("single_player_code2");
var cta=$("single_player_code"+idx);
if(tb1&&tb2&&ctb&&ta1&&ta2&&cta){
tb1.className="tabitem";
tb2.className="tabitem";
ctb.className="tabitemcur";
Element.hide(ta1);
Element.hide(ta2);
Element.show(cta);
}
}
function single_player_update_code(){
var ap=$("single_player_autoplay");
var vl=$("single_player_volume");
var cd1=$("single_player_code1");
var cd2=$("single_player_code2");
var h1=$("single_player_hidden1");
var h2=$("single_player_hidden2");
var h3=$("single_player_hidden3");
if(ap&&vl&&cd1&&cd2&&h1&&h2&&h3){
var _204=parseInt(vl.value);
if(isNaN(_204)){
_204=80;
}
_204=Math.min(_204,100);
_204=Math.max(_204,0);
vl.value=_204;
var auto=ap.checked?"1":"0";
var str="|autoPlay|"+auto+"|volume|"+_204;
cd1.value=h1.value+str+h2.value;
cd2.value=h3.value+str;
}
}
function show_listenlogindlg(){
var dlg=$("yobo_loginlistendialog");
var yb=$("yobo");
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 show_friendlogindlg(){
var dlg=$("yobo_loginfrienddialog");
var yb=$("yobo");
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 show_logindlg(type){
var dlg=$("yobo_loginfloatdialog");
var yb=$("yobo");
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 type!="undefined"){
var _21a=$("signon_type_hidden");
if(_21a){
_21a.value=type;
}
}
}
}
function show_registdlg(){
var dlg=$("yobo_regfloatdialog");
var yb=$("yobo");
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,_223){
var dlg=$("yobo_singerfond");
var tit=$("yobo_singerfond_title");
var cnt=$("yobo_singerfond_content");
var hid=$("yobo_singerfond_sid");
var yb=$("yobo");
if(dlg&&tit&&cnt&&hid&&yb){
before_showfloatdialog();
tit.innerHTML=_223;
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,_22f){
var dlg=$("yobo_singerunfond");
var tit=$("yobo_singerunfond_title");
var cnt=$("yobo_singerunfond_content");
var hid=$("yobo_singerunfond_sid");
var yb=$("yobo");
if(dlg&&tit&&cnt&&hid&&yb){
before_showfloatdialog();
tit.innerHTML=_22f;
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 onshow_floatlyric(div,sid){
var left=getPos(div,"Left");
var top=getPos(div,"Top");
var hid=$("yobo_floatlyric_hid");
var dlg=$("yobo_floatlyric");
if(dlg){
if(hid){
if(hid.value==sid){
Element.show(dlg);
return false;
}
}
show_loading(div);
new Ajax.Request("/song/show_lyric/"+sid+"?left="+left+"&top="+top,{method:"get",asynchronous:true,evalScripts:true});
}
}
function show_lyricdialog(l,t){
var dlg=$("yobo_floatlyric");
if(dlg){
before_showfloatdialog();
dlg.style.left=(l-284)+"px";
dlg.style.top=(t-78)+"px";
Element.show(dlg);
}
}
function onsubmitleftsearch(){
var ipt=$("searchinput");
if(ipt){
input_onfocusclear(ipt);
if(ipt.value.length==0){
alert(ERROR_NO_SEARCHCONTENT);
return false;
}
return true;
}
return false;
}
function yobo_removedom(id,ajax){
var dom=$(id);
var dsd=$("tool_deleteshadow");
if(dom&&dsd){
dsd.style.top=getPos(dom,"Top")+"px";
dsd.style.left=getPos(dom,"Left")+"px";
dsd.style.width=dom.offsetWidth+"px";
dsd.style.height=dom.offsetHeight+"px";
Element.show(dsd);
Element.setOpacity(dsd,0.5);
new Effect.Opacity(dom,{duration:1,from:1,to:0});
if(ajax){
setTimeout("Element.remove('"+id+"')",1100);
setTimeout("Element.hide('tool_deleteshadow')",1100);
}else{
setTimeout("location.reload()",700);
}
}
}
function onscrolltopage(did){
var div=$(did);
if(div){
var tar=getPos(did,"Top")-100;
var cur=getPageOffsetY();
var tot=10;
if(Math.abs(tar-cur)>100){
var step=Math.floor((tar-cur)/tot);
var intv=Math.ceil(1000/tot);
setTimeout("pagescrollto('"+did+"',"+cur+","+step+","+intv+","+tot+")",intv);
}else{
pagescrollto(did,0,0,0,0);
}
}
}
function pagescrollto(did,cur,step,intv,tot){
if(tot>0){
var top=cur+step;
if(UA=="ie"||UA=="ie7"){
document.documentElement.scrollTop=top;
}else{
window.scrollTo(0,top);
}
setTimeout("pagescrollto('"+did+"',"+top+","+step+","+intv+","+(tot-1)+")",intv);
}else{
var ypb=$("yobo_pulsateblock");
var div=$(did);
if(ypb&&div){
ypb.style.top=(getPos(div,"Top")-3)+"px";
ypb.style.left=(getPos(div,"Left")-3)+"px";
ypb.style.width=div.offsetWidth+"px";
ypb.style.height=div.offsetHeight+"px";
Element.show(ypb);
Effect.Pulsate(ypb);
setTimeout("Element.hide('yobo_pulsateblock')",1600);
}
}
}
function uf_onpoke(info,fid,div){
new Ajax.Request("/message/poke/"+fid,{method:"get",asynchronous:true,evalScripts:true});
Element.hide(div);
}
function show_hiddenstyle(_259){
switch(_259){
case "xmas":
var wb=$("widebar");
var pb=$("pagebody");
if(wb&&pb){
var bd=document.body;
bd.style.background="white url(/images/icons/xmas_xh_bg.gif)";
wb.style.background="url(/images/icons/xmas_xr.gif) no-repeat left bottom";
pb.style.background="url(/images/icons/xmas_lr.gif) no-repeat right top";
}
break;
}
}
function show_leftbarmore(){
var mbtn=$("menulist_linkmore");
var lbtn=$("menulist_linkless");
var mcnt=$("menulist_listmore");
if(mbtn&&lbtn&&mcnt){
Element.hide(mbtn);
Element.show(lbtn);
Effect.BlindDown("menulist_listmore");
}
}
function hide_leftbarmore(){
var mbtn=$("menulist_linkmore");
var lbtn=$("menulist_linkless");
var mcnt=$("menulist_listmore");
if(mbtn&&lbtn&&mcnt){
Element.hide(lbtn);
Element.hide(mcnt);
Element.show(mbtn);
}
}
function pop_addsong(sid,dom){
var pct=false;
if(navigator.appName.indexOf("Microsoft")!=-1){
pct=window["popconnector"];
}else{
pct=document["popconnector"];
}
if(pct){
try{
dom.parentNode.innerHTML="&nbsp;";
var tmp=[];
tmp.push(sid);
pct.addMusic(tmp);
traceError(tmp);
}
catch(e){
traceError("Error pop_addsong -> "+e);
}
}else{
traceError("Error pop_addsong -> Can not find 'popconnector'.");
}
}
function pop_addlist(list,btn){
var pct=false;
if(navigator.appName.indexOf("Microsoft")!=-1){
pct=window["popconnector"];
}else{
pct=document["popconnector"];
}
if(pct){
try{
var tmp=[];
for(var i=0;i<list.length;i++){
if(list[i].sid!=-1){
tmp.push(list[i].sid);
var dom=$("ybs"+list[i].sid+list[i].rnd+"_pop");
if(dom){
dom.innerHTML="&nbsp;";
}
}
}
btn.innerHTML="";
if(tmp.length>0){
pct.addMusic(tmp);
}
traceError(tmp);
}
catch(e){
traceError("Error pop_addlist -> "+e);
}
}else{
traceError("Error pop_addlist -> Can not find 'popconnector'.");
}
}
function pop_addboxsong(_26d,sid,dom){
var pct=false;
if(navigator.appName.indexOf("Microsoft")!=-1){
pct=window["popconnector"];
}else{
pct=document["popconnector"];
}
if(pct){
try{
dom.parentNode.innerHTML="&nbsp;";
pct.playBox(_26d,sid);
}
catch(e){
traceError("Error pop_addboxsong -> "+e);
}
}else{
traceError("Error pop_addboxsong -> Can not find 'popconnector'.");
}
}
function pop_addboxlist(_271,list,btn){
var pct=false;
if(navigator.appName.indexOf("Microsoft")!=-1){
pct=window["popconnector"];
}else{
pct=document["popconnector"];
}
if(pct){
try{
for(var i=0;i<list.length;i++){
var dom=$("ybs"+list[i].sid+list[i].rnd+"_pop");
if(dom){
dom.innerHTML="&nbsp;";
}
}
btn.innerHTML="";
pct.playBox(_271,-1);
}
catch(e){
traceError("Error pop_addboxlist -> "+e);
}
}else{
traceError("Error pop_addboxlist -> Can not find 'popconnector'.");
}
}
function openPopPlayer(lid){
var wnt=window.open("/pop/player?lid="+lid,"YOBOPopPlayer","width=450,height=600,status=no,menubar=no,location=no,resizable=no,scrollbars=no,directories=no,toolbar=no");
if(!wnt||wnt.closed||!wnt.location){
alert(ERROR_ANTIPOPWINDOW);
}
}
function changemusic(_279,_27a){
return false;
new Ajax.Request("url"+"?singer_id="+_279+"&song_id="+_27a,{asynchronous:true,evalScripts:true});
}
function changeMore(id1,id2){
changeDisplay(id1,"none");
changeDisplay(id2,"block");
}
function selectTab(_27d,_27e){
try{
var tag=($obj("tabs")).getElementsByTagName("li");
var _280=tag.length;
for(i=0;i<_280;i++){
tag[i].className="";
}
_27e.parentNode.className="selectTab";
for(i=0;j=$obj("tabContent"+i);i++){
j.style.display="none";
}
$obj(_27d).style.display="block";
}
catch(e){
}
}
function changeDisplay(id,_282){
$obj(id).style.display=_282;
}
function changeVisible(id){
if($obj(id).style.display=="visible"){
$obj(id).style.display=="hidden";
}else{
$obj(id).style.display=="visible";
}
}
function $obj(id){
return document.getElementById(id);
}
function refresh(){
window.location.reload();
}
function getPageUrl(){
return window.location.toString();
}
function focuFirstInput(_285){
try{
var _286=$(_285).getElementsByTagName("input");
for(var i=0;i<_286.length;i++){
var _288=_286[i];
if(_288.type=="text"&&(_288.style.display!="none"||_288.style.visibility!="hidden")){
_288.focus();
return;
}
}
}
catch(e){
}
}
function setGAURL(url){
try{
pageTracker._trackPageview(url);
}
catch(e){
}
}
function show_rfmenu(){
}
function hide_rfmenu(){
}
function yobo_dom_ready(_28a){
__domReady(_28a);
}
function get_current_user(_28b){
try{
new Ajax.Request("/js/get_current_user",{asynchronous:true,evalScripts:true,onSuccess:function(_28c){
var _28d=_28c.responseText;
}});
}
catch(e){
}
}
function __clear(_28e){
clearTimeout(_28e);
clearInterval(_28e);
return null;
}
function __attach_event(evt,_290){
if(window.addEventListener){
window.addEventListener(evt,_290,false);
}else{
if(window.attachEvent){
window.attachEvent("on"+evt,_290);
}
}
}
function __domReady(f){
if(__domReady.done){
return f();
}
if(__domReady.timer){
__domReady.ready.push(f);
}else{
__attach_event("load",__isDOMReady);
__domReady.ready=[f];
__domReady.timer=setInterval(__isDOMReady,100);
}
}
function __isDOMReady(){
if(__domReady.done){
return false;
}
if(document&&document.getElementsByTagName&&document.getElementById&&document.body){
__clear(__domReady.timer);
__domReady.timer=null;
for(var i=0;i<__domReady.ready.length;i++){
__domReady.ready[i]();
}
__domReady.ready=null;
__domReady.done=true;
}
}
function updateCommentUserImg(path){
$("comments_user_img").src=path;
}
function stopDefaultAction(_294){
_294.returnValue=false;
if(typeof _294.preventDefault!="undefined"){
_294.preventDefault();
}
}
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 closeClassicDlg(_297){
var dom=$(_297);
while(dom){
show_mainplayer();
if(dom.className=="yobo_floatdialog"){
dom.parentNode.style.display="none";
hideShadow();
break;
}
if(dom.parentNode){
dom=dom.parentNode;
}else{
break;
}
}
}
function submitBack(){
var _299="\u4fe1\u606f\u63d0\u4ea4\u6210\u529f";
var _29a={title:"\u62a5\u544a\u9519\u8bef",li:[_299],className:"success"};
show_printEdialog(_29a);
}
function song_error_submit(_29b){
show_loading(_29b);
setTimeout(function(){
submitBack();
$("song_error_dlg").style.display="none";
hide_loading();
},3000);
}
