document.domain="muzgame.com";
var popupWin = null;
function playAllSong(usid, type) { 	
    play(usid,type);
}

function playSong(usid, type) {
	play(usid,type);
}

function play(usid,type) {		//单曲播放
	var url = "http://www.muzgame.com/player/player.jsp?usid="+usid+"&type="+type;
	if( !popupWin || popupWin.closed || !popupWin.doReloadUserSong ) {
		popupWin = window.open( url, "popupWin", "width=640,height=640" );
	} else{
		popupWin.focus();
		popupWin.doReloadUserSong(usid,type);
	}
}

function collect(id) {		    //歌曲收藏
	window.location = "http://www.muzgame.com/user/SongCellection.jsp?sid="+id;
}

function sendsong(id) {　　		//点歌
	window.location = "http://www.muzgame.com/rank/sendsong.jsp?sid="+id;
} 

function openAlbumPlayer(aid) { //专辑播放
	openPopupAlbum(aid);
}

function openPopupAlbum(aid) {
	var url = "http://www.muzgame.com/player/player.jsp?aid="+aid;
	if( !popupWin || popupWin.closed || !popupWin.doReloadSongAlbum ) {
		popupWin = window.open( url, "popupWin", "width=640,height=640" );
	} else{
		popupWin.focus();
		popupWin.doReloadSongAlbum(aid);
	}
}

function mvPlay(mvid,position){
  if (true) {
    alert("系统维护中，该视频暂时不能访问！请谅解！");
    return;
  }
	//alert(mvid+":"+position);
	for(i=0;i<6;i++){
			$("#mv_img_"+i).hide();
	//	if(i!=position){
			$("#mv"+position).css("nopic");
	//	}
	}
	$("#mv_img_"+position).show("slow");
 
	//alert(mvplayer);
	
	$("#mvplayer").slideDown("slow");
	setPlayerTimeOut(mvid);
	//window.setTimeout("setPlayerTimeOut("+mvid+")",1000);
	
}
function mvPlay2(path,position){
  if (true) {
    alert("系统维护中，该视频暂时不能访问！请谅解！");
    return;
  }
	//alert(path+":"+position);
	for(i=0;i<6;i++){
			$("#mv_img_"+i).hide();
	//	if(i!=position){
			$("#mv"+position).css("nopic");
	//	}
	}
	$("#mv_img_"+position).show("slow");
 
	//alert(mvplayer);
	
	$("#mvplayer").slideDown("slow");
	setPlayerTimeOut2(path);
	//window.setTimeout("setPlayerTimeOut("+mvid+")",1000);
	
}
function setPlayerTimeOut(mvid){
  if (true) {
    alert("系统维护中，该视频暂时不能访问！请谅解！");
    return;
  }
	if (document.getElementById('musicbox').PercentLoaded() < 100) {
			t = setTimeout("setPlayerTimeOut("+mvid+")",10);
			return;
	}
	//alert("document.getElementById('musicbox').PercentLoaded()="+document.getElementById('musicbox').PercentLoaded());
	setTimeout("loadflv("+mvid+")",100); 
	//loadflv(mvid);
	//$("#musicbox").focus();
	//thisMovie("musicbox").loadflv(mvid);
}
function setPlayerTimeOut2(path){
  if (true) {
    alert("系统维护中，该视频暂时不能访问！请谅解！");
    return;
  }
	if (document.getElementById('musicbox').PercentLoaded() < 100) {
			t = setTimeout("setPlayerTimeOut2('"+path+"')",10);
			return;
	}
	//alert("document.getElementById('musicbox').PercentLoaded()="+document.getElementById('musicbox').PercentLoaded());
	setTimeout("jspValue('"+path+"')",100); 
	//loadflv(mvid);
	//$("#musicbox").focus();
	//thisMovie("musicbox").jspValue(mvid);
}
function closeMvplayer(){
	_stopPlay();
	$("#mvplayer").slideUp('slow');
	//thisMovie("musicbox").stopflv();
}
function _stopPlay(){ 
 	Musicbox1=document.getElementById("musicbox");
 	Musicbox1.TCallLabel("_root","_stopPlay"); //关闭
}