﻿

//打开一个弹出式窗口，如果此窗口已经存在，则只是加入。
function GetCookie(name)
{
    var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
    if(arr != null) return unescape(arr[2]); return null;
}
//异步调用，判断是否是包月用户
function IsBaoYue(callback,context)
{
 var url="/ajax/Top100Web.Audition.PlayAJAX,Top100Web.ashx";
 return new ajax_request(url + '?_method=IsBaoYue&_session=rw','',callback, context);
}

function play(url) 
  { 
//歌曲专辑

 url=url.replace(/Play.htm\?ProductID=M/i,"flplayer.html?song=M");
  url=url.replace(/Play.htm\?song=M/i,"flplayer.html?song=M");
 url=url.replace(/Play.htm\?ProductID=S/i,'flplayer.html?album=S');

//播放列表
 if(url.indexOf('_')>1)
 {url=url.replace(/Play.htm\?ProductID=/i,'flplayer.html?playlist=');
url=url.replace('_','');
  }
//复选框时用cookie(AuditionTrackList ) url=Play.htm?PM=1
 url=url.replace(/Play.htm\?PM=1/i,'flplayer.html?cookie=AuditionTrackList');

 var playWindow;
 	playWindow = window.open(url,"playWindow","width=790px,height=560px,top=100px,left=590px,scrollbars=no,resizable=no");            

      playWindow.focus();
  }