
function music_play(sid,semoney,spower)
{
  open_win('play.asp?sid='+sid,'music_play_win',50,50,'no');
}

function music_download(sid,semoney,spower)
{
  var ne=note_emoney('下载此音乐文件',semoney,spower);
  if (ne==true)
  { open_win('music_view_download.asp?sid='+sid,'music_play_win',50,50,'no'); }
}

function music_fav(ftype,fid)
{
  open_win('music_fav_action.asp?action='+ftype+'&fid='+fid,'music_fav_action',50,50,'no');
}

function music_check_play(form,ct)
{
  var mlength=form.elements.length-3;
  var chk_true="no";

  for (var i=0; i<mlength; i++)
  {
    if (form.sid[i].checked) { chk_true="yes";break; }
  }

  if (chk_true=="yes")
  {
    if (ct=="yes")
    {
      open_win('about:blank','music_play_win',400,220,'no');
      form.submit();
    }
    else
    {
      var cf=window.confirm("执行此删除操作后无法恢复！\n\n你确定吗？");
      if (cf) { form.submit(); } 
    }
  }
  else
  {
    alert("请先选择歌曲！");
    return false;
  }
}

function music_check_other(form)
{
  var e;
  for (var i=0;i<form.elements.length-3;i++)
  {
    e=form.elements[i];
    if (e.checked==false) { e.checked=true; } else { e.checked=false; }
  }
}

function music_check_all(form)
{
  var e;
  for (var i=0;i<form.elements.length-3;i++) { e=form.elements[i]; e.checked=true; }
}