// JavaScript Document
//if(top.location.href==self.location.href){	top.location.href="/";}
junjunHtmlText='<table border="0" cellspacing="0" cellpadding="0" width="100%" id="lrcoll" oncontextmenu="return false;">'
junjunHtmlText+='<tr><td nowrap height="20" align="center" id="lrcwt1"></td></tr>'
junjunHtmlText+='<tr><td nowrap height="20" align="center" id="lrcwt2"></td></tr>'
junjunHtmlText+='<tr><td nowrap height="20" align="center" id="lrcwt3"></td></tr>'
junjunHtmlText+='<tr><td nowrap height="20" align="center" id="lrcwt4"></td></tr>'
junjunHtmlText+='<tr><td nowrap height="20" align="center">'
junjunHtmlText+='<table border="0" cellspacing="0" cellpadding="0">'
junjunHtmlText+='<tr><td nowrap height="20" id="lrcwt5"></td></tr>'
junjunHtmlText+='<tr style="position:relative;top:-20px;z-index:6"><td nowrap height="20"><div id="lrcfilter" style="overflow:hidden;width:100%;color:#0080C0;height:20px"></div></td></tr>'
junjunHtmlText+='</table>'
junjunHtmlText+='</td></tr>'
junjunHtmlText+='<tr style="position:relative;top:-20px"><td nowrap height="20" align="center">'
junjunHtmlText+='<table border="0" cellspacing="0" cellpadding="0">'
junjunHtmlText+='<tr><td nowrap height="20"><span id="lrcbox" style="height:20px;">www.okyyw.com</span></td></tr>'
junjunHtmlText+='<tr style="position:relative;top:-20px;z-index:6;"><td nowrap height="20"><div id="lrcbc" style="overflow:hidden;height:20px;width:0;"></div></td></tr>'
junjunHtmlText+='</table>'
junjunHtmlText+='</td></tr>'
junjunHtmlText+='<tr style="position:relative;top:-40px;"><td nowrap height="20" align="center" id="lrcwt6"></td></tr>'
junjunHtmlText+='<tr style="position:relative;top:-40px;"><td nowrap height="20" align="center" id="lrcwt7"></td></tr>'
junjunHtmlText+='<tr style="position:relative;top:-40px;"><td nowrap height="20" align="center" id="lrcwt8"></td></tr>'
junjunHtmlText+='<tr style="position:relative;top:-40px;"><td nowrap height="20" align="center" id="lrcwt9"></td></tr>'
junjunHtmlText+='<tr style="position:relative;top:-40px;"><td nowrap height="20" align="center" id="lrcwt10"></td></tr>'
junjunHtmlText+='</table>'
function chkAll(frm){
	for (var i=0;i<frm.elements.length;i++){
		var junjunFrm = frm.elements[i];
		     junjunFrm.checked = true;
	}
	return false;
}
function chkOthers(frm){
	for (var i=0;i<frm.elements.length;i++){
		var junjunFrm = frm.elements[i];
		     junjunFrm.checked = false;
	}
	return false;
}
function chkPlayer(frm){
	var junjunUrlID="";
	var isnull=false;
	for (var i=0;i<frm.elements.length;i++){
		var junjunFrm = frm.elements[i];
		if(junjunFrm.checked&&junjunFrm.type!="button"){
			junjunUrlID+=junjunFrm.value;
			isnull=true;
		}
	}
	if(!isnull){
		alert("请选上一首！"); 
		return false;
	}
	
	if(frm.name=="frm"){
		location.href="/MusicList/junjunPlayer.asp?"+junjunUrlID;	
	}else{
		location.href="/MusicList/junjunPlayer.asp?"+junjunUrlID;
	}	
	return false;
}
function junjunPlayer(){
	if(junjunInput.selectedIndex<0){
      alert("请选择您要播放的曲目");
	}else{
      var junjunMusicArray,junjunMusicUrl,junjunMusicName,junjunMusicCollect,junjunMusicPerson,junjunMusicType,junjunMusicServerID
	  junjunMusicArray=junjunInput.options[junjunInput.selectedIndex].value.split("|")
	  junjunMusicUrl=junjunMusicArray[0];//歌曲地址
	  junjunMusicName=junjunMusicArray[1];//歌曲名称
	  junjunMusicCollect=junjunMusicArray[2];//歌手
	  junjunMusicPerson=junjunMusicArray[3];//发布人
	  junjunMusicID=junjunMusicArray[4];//歌曲ID
	  junjunMusicType=junjunMusicArray[5];//播放器类型
	  junjunMusicServerID=junjunMusicArray[6];//所属服务器
	  if(junjunMusicName.length>5){junjunMusicNameText.innerText=junjunMusicName.substr(0,4)+""}else{junjunMusicNameText.innerText=junjunMusicName}
	  if(junjunMusicCollect.length>5){junjunMusicCollectText.innerText=junjunMusicCollect.substr(0,4)+""}else{junjunMusicCollectText.innerText=junjunMusicCollect}
	  if(junjunMusicPerson.length>7){junjunMusicPersonText.innerText=junjunMusicPerson.substr(0,7)+""}else{junjunMusicPersonText.innerText=junjunMusicPerson}
	  if(junjunMusicType==1){
	  	lrcollbox.innerHTML="<iframe frameborder=\"0\" height=\"320\" width=\"295\" scrolling=\"auto\" src=\"../junjunHtmlgc/junjungc_"+junjunMusicID+".Html\"><\/iframe>";
	  }else{		
		lrcollbox.innerHTML=junjunHtmlText;
	  	playLRC("../junjunHtmlgc/junjungc_"+junjunMusicID+".Html");
	  }
	  junjunMusicAddID.innerHTML="<a href='../User/MusicAdd.asp?junjunID="+junjunMusicID+"'  target='junjunMusicAdd'>加入收藏</a>"
	  //playLRC("junjunHtmlgc/junjungc_"+junjunMusicID+".Html");
	  //junjunMusicList(junjunMusicServerID);
	  junjunPlayerID.URL=junjunMusicList(junjunMusicServerID)+junjunMusicUrl;
	  setTimeout("onerrUrl();",3000);
	  junjunIsStop();	  
	}
	return false;
}

function junjunNextMusic(){
   if(junjunInput.selectedIndex>=0){
		if(junjunInput.selectedIndex<junjunInput.length-1){
			junjunInput.options[junjunInput.selectedIndex+1].selected=true;
			junjunPlayer();
		}else{
			junjunInput.options[0].selected=true;
			junjunPlayer();
		}   
   }
   return false;
}
function junjunPrevMusic(){
	if((junjunInput.selectedIndex>0)&&(junjunInput.selectedIndex<junjunInput.length)){
		junjunInput.options[junjunInput.selectedIndex-1].selected=true;
		junjunPlayer();
	}
	return false;
}
function junjunIsStop(){//单个歌曲播放是否完毕，如果完毕则1秒后实行下一首歌曲
	if(junjunPlayerID.playState==1){junjunNextMusic();}
	setTimeout("junjunIsStop();",1000);
	return false;
}
function onerrUrl(){
	if(junjunPlayerID.playState==10){junjunNextMusic();}
	return false;
}
