function toggle_aggrlink(_1,_2){
var _3=$(_2);
if(_3){
if(_3.style.display=="none"){
Element.show(_3);
_1.className="titlemenulink_r";
}else{
Element.hide(_3);
_1.className="titlemenulink";
}
}
}
function aggruser_favplaylist(_4,_5,_6){
var _7=[];
var fm=$(_4);
if(_5){
var cl=fm[_5];
}else{
var cl=fm["checkbox[]"];
}
if(cl&&fm){
var ll=$A(cl);
if(ll.length>0){
ll.each(function(el,_c){
if(el.checked){
if(_6[el.value]){
_7.push(_6[el.value]);
}
}
});
}else{
if(cl.checked){
if(_6[cl.value]){
_7.push(_6[cl.value]);
}
}
}
}
if(_7.length>0){
yobo_play_list(_7,0);
}else{
alert(ERROR_NO_ALBUMSONG);
}
}
function show_aggrsongcommentdlg(_d,_e){
var _f=$("aggrmusic_commentsongdialog");
var hid=$("aggrmusic_dialogsongid");
if(_f&&hid){
before_showfloatdialog();
Element.show(_f);
var top=getPos(_d,"Top");
_f.style.top=top+"px";
hid.value=_e;
}
}
function show_aggralbumcommentdlg(dom,aid){
var dlg=$("aggrmusic_commentalbumdialog");
var hid=$("aggrmusic_dialogalbumid");
if(dlg&&hid){
before_showfloatdialog();
Element.show(dlg);
var top=getPos(dom,"Top");
dlg.style.top=top+"px";
hid.value=aid;
}
}
var AGGR_HINTTIMER=null;
function show_aggrfloathint(_17,_18,_19){
var dlg=$("yoboaggr_floathintdialog");
var dht=$("yoboaggr_floathintdialogheader");
var dcn=$("yoboaggr_floathintdialogcontent");
if(dlg&&dht&&dcn){
if(AGGR_HINTTIMER){
clearTimeout(AGGR_HINTTIMER);
hide_aggrfloathint();
}
if(_19){
dht.innerHTML=_19;
Element.show(dht);
}else{
Element.hide(dht);
}
dcn.innerHTML=_18;
var e=window.event?window.event:_17;
dlg.style.left=Event.pointerX(e)+"px";
dlg.style.top=Event.pointerY(e)+20+"px";
Element.show(dlg);
AGGR_HINTTIMER=setTimeout("hide_aggrfloathint()",5*1000);
}
}
function hide_aggrfloathint(){
if(AGGR_HINTTIMER){
clearTimeout(AGGR_HINTTIMER);
}
var dlg=$("yoboaggr_floathintdialog");
var dht=$("yoboaggr_floathintdialogheader");
var dcn=$("yoboaggr_floathintdialogcontent");
if(dlg&&dht&&dcn){
dht.innerHTML="";
dcn.innerHTML="";
Element.hide(dht);
Element.hide(dlg);
}
}
function show_albumhint(_21,_22,_23){
var str=_22+"<br />on&nbsp;"+MSG_AGGRFLOATHINT_LEFT+_23+MSG_AGGRFLOATHINT_RIGHT;
show_aggrfloathint(_21,str);
}
function show_grouphint(_25,_26,_27,_28){
var str=_27+":&nbsp;"+_28;
show_aggrfloathint(_25,str,_26);
}
if(typeof (yobo_calenderItem)!="function"){
var yobo_calenderItem=Class.create();
yobo_calenderItem.prototype={initialize:function(_2a,_2b,_2c,_2d,_2e,_2f){
var _30=new Date();
this.cury=_2a;
this.curm=_2b;
this.curd=_2c;
this.toy=_30.getFullYear();
this.tom=_30.getMonth()+1;
this.tod=_30.getDate();
this.disy=this.cury;
this.dism=this.curm;
this.disd=this.curd;
this.dom=$(_2d);
this.href=_2e;
this.tail=_2f;
},drawTable:function(){
try{
if(this.dom){
var _31=new Date();
this.toy=_31.getFullYear();
this.tom=_31.getMonth()+1;
this.tod=_31.getDate();
var _32=false;
var _33=false;
var _34=(this.disy>this.toy)||((this.disy==this.toy)&&(this.dism>=this.tom));
if(this.disy==this.cury&&this.dism==this.curm){
_32=true;
}
if(this.disy==this.toy&&this.dism==this.tom){
_33=true;
}
var i=0;
var j=2;
var _37=new Date();
_37.setYear(this.disy);
_37.setMonth(this.dism-1);
_37.setDate(1);
var _38=_37.getDay();
this.dom.innerHTML="";
var _39=document.createElement("table");
this.dom.appendChild(_39);
_39.className="caltable";
_39.cellPadding="0";
_39.cellSpacing="0";
var _3a=_39.insertRow(0);
var _3b=_3a.insertCell(0);
var _3c=document.createElement("a");
_3b.appendChild(_3c);
_3c.href="javascript:void(0);";
_3c.innerHTML="<img src='/images/icons/aggr_calendariconleft.gif' />";
Event.observe(_3c,"click",this.gotoPrevMonth.bindAsEventListener(this));
var _3d=_3a.insertCell(1);
_3d.colSpan="5";
_3d.className="tabletitle";
_3d.innerHTML=this.disy+MSG_AGGRCAL_YEAR+this.dism+MSG_AGGRCAL_MONTH;
var _3e=_3a.insertCell(2);
if(_34){
_3e.innerHTML="&nbsp;";
}else{
var _3f=document.createElement("a");
_3e.appendChild(_3f);
_3f.href="javascript:void(0);";
_3f.innerHTML="<img src='/images/icons/aggr_calendariconright.gif' />";
Event.observe(_3f,"click",this.gotoNextMonth.bindAsEventListener(this));
}
var _40=_39.insertRow(1);
_40.className="tableweek";
for(i=0;i<=6;i++){
var _41=_40.insertCell(i);
_41.innerHTML=DAY_ARRAY[i];
}
var _42=this.getTotalDay(this.disy,this.dism);
var _43=Math.ceil((_42+_38)/7);
var _44=1;
for(j=2;j<_43+2;j++){
var _45=_39.insertRow(j);
if(j==2){
for(i=0;i<_38;i++){
var _41=_45.insertCell(i);
_41.innerHTML="&nbsp;";
}
for(i;i<7;i++){
var _46=(this.disy>this.toy)||((this.disy==this.toy)&&((this.dism>this.tom)||((this.dism==this.tom)&&(_44>=this.tod))));
var _47=_45.insertCell(i);
if(_46){
var _48=document.createElement("span");
_47.appendChild(_48);
_48.innerHTML=_44;
if(_44==this.tod){
_48.className="tabletoday";
}
}else{
var _49=document.createElement("a");
_47.appendChild(_49);
_49.innerHTML=_44;
_49.href=this.href+"/"+this.disy+"/"+this.dism+"/"+_44+this.tail;
_49.className="tableitem";
if(_32&&_44==this.curd){
_49.className+=" tablecurrent";
}
}
_44++;
}
}else{
if(j==_43+1){
var _4a=_42-_44;
for(i=0;i<=_4a;i++){
var _46=(this.disy>this.toy)||((this.disy==this.toy)&&((this.dism>this.tom)||((this.dism==this.tom)&&(_44>=this.tod))));
var _47=_45.insertCell(i);
if(_46){
var _48=document.createElement("span");
_47.appendChild(_48);
_48.innerHTML=_44;
if(_44==this.tod){
_48.className="tabletoday";
}
}else{
var _49=document.createElement("a");
_47.appendChild(_49);
_49.innerHTML=_44;
_49.href=this.href+"/"+this.disy+"/"+this.dism+"/"+_44+this.tail;
_49.className="tableitem";
if(_32&&_44==this.curd){
_49.className+=" tablecurrent";
}
}
_44++;
}
for(i;i<7;i++){
var _41=_45.insertCell(i);
_41.innerHTML="&nbsp;";
}
}else{
for(i=0;i<7;i++){
var _46=(this.disy>this.toy)||((this.disy==this.toy)&&((this.dism>this.tom)||((this.dism==this.tom)&&(_44>=this.tod))));
var _47=_45.insertCell(i);
if(_46){
var _48=document.createElement("span");
_47.appendChild(_48);
_48.innerHTML=_44;
if(_44==this.tod){
_48.className="tabletoday";
}
}else{
var _49=document.createElement("a");
_47.appendChild(_49);
_49.innerHTML=_44;
_49.href=this.href+"/"+this.disy+"/"+this.dism+"/"+_44+this.tail;
_49.className="tableitem";
if(_32&&_44==this.curd){
_49.className+=" tablecurrent";
}
}
_44++;
}
}
}
}
traceError("Today:"+this.toy+"/"+this.tom+"/"+this.tod);
traceError("Current:"+this.cury+"/"+this.curm+"/"+this.curd);
traceError("Display:"+this.disy+"/"+this.dism+"/"+this.disd);
traceError("First:"+_38+"/Total:"+_42+"/Row:"+_43+"/getTotalDay:"+this.getTotalDay(this.disy,this.dism));
traceError("Tail:"+this.tail);
}else{
traceError("Error yobo_calenderItem::drawTable -> NO element:"+this.domid);
}
}
catch(e){
traceError("Error yobo_calenderItem::drawTable -> "+e);
}
},initCalendar:function(){
this.drawTable();
},getTotalDay:function(y,m){
var da=[31,28,31,30,31,30,31,31,30,31,30,31];
var db=[31,29,31,30,31,30,31,31,30,31,30,31];
var rn=(y%400==0)||((y%100!=0)&&(y%4==0));
if(rn){
return db[m-1];
}else{
return da[m-1];
}
},gotoNextMonth:function(){
this.dism++;
if(this.dism>12){
this.dism=1;
this.disy++;
}
this.drawTable();
},gotoPrevMonth:function(){
this.dism--;
if(this.dism<1){
this.dism=12;
this.disy--;
}
this.drawTable();
}};
}
function aggr_update_topsong(id,fr,div){
show_loading(div);
new Ajax.Request("/s3/update_topsong/"+id+"?fr="+fr,{asynchronous:true,evalScripts:true});
}
