﻿document.writeln("<table width=\"772\" height=\"336\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"320\" valign=\"top\"><table width=\"100%\" height=\"100%\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td valign=\"top\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td height=\"30\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"table-layout:fixed;\"><tr><td width=\"4\"><img src=\"/Play/I/lleft.gif\" width=\"4\" height=\"30\"></td><td width=\"11\"><img src=\"/Play/I/lcd2_left.gif\" width=\"11\" height=\"30\"></td><td nowrap=\"nowrap\" background=\"/Play/I/lcd2_bg.gif\">&nbsp;<span class=\"shadow bold\">歌词微调：<span class=h onClick=\"setLrc(1);\" title=将歌词显示前进一秒>快进</span> <span class=h onClick=\"setLrc(-1);\" title=将歌词显示退后一秒>后退</span> <span class=h onClick=\"setLrc(0);\" title=将歌词显示恢复默认值>默认</span> 报告错误：<span class=h onClick=\"ReportError();\" title=如果该歌曲无歌词、或歌词和歌曲不匹配、或您又更好的歌词可使用本功能>发送报告</span></span></td>");
document.writeln("<td width=\"10\"><img src=\"/Play/I/lcd2_right.gif\" width=\"10\" height=\"30\"></td></tr></table></td></tr></table></td></tr><tr><td width=\"320\" height=\"240\" id=\"LrcBG\">&nbsp;</td></tr><tr><td width=\"320\" height=\"66\" class=\"PlayerBG\" align=\"center\"><table width=\"100%\" bgcolor=\"#000000\" height=\"66\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td height=\"1\" bgcolor=\"#808080\"></td></tr><tr><td height=\"20\"><table width=\"100%\" style=\"table-layout:fixed;\" border=\"0\" cellspacing=\"3\" cellpadding=\"0\"><tr><td width=\"32\" align=\"center\"><img id=\"StateIMG\" src=\"/Play/i/stop.gif\" alt=\"准备就绪\" width=\"32\" height=\"15\" align=\"absmiddle\"></td><td id=\"Caption\" nowrap>准备就绪.</td><td width=\"69\" id=\"TimeLine\" nowrap>&nbsp;</td></tr></table></td></tr><tr><td height=\"45\">");
document.writeln("<object id=\"CN772Player\" width=\"320\" height=\"45\" classid=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\"><param name=\"autostart\" value=\"true\"><param name=\"uiMode\" value=\"full\"><param name=\"volume\" value=\"100\"><param name=\"enableContextMenu\" value=\"false\"></object></td></tr></table></td></tr></table></td><td width=\"452\" valign=\"top\"><table width=\"100%\" height=\"336\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td height=\"30\" background=\"/Play/I/bg2.gif\" id=\"pl_header\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td height=\"30\"><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"table-layout:fixed;\"><tr><td width=\"11\"><img src=\"/Play/I/lcd2_left.gif\" width=\"11\" height=\"30\"></td><td nowrap=\"nowrap\" background=\"/Play/I/lcd2_bg.gif\"><span class=\"shadow bold\">&nbsp;播放列表</span></td><td width=\"11\"><img src=\"/Play/I/lcd2_right.gif\" width=\"10\" height=\"30\"></td></tr></table></td><td width=\"20\">");
document.writeln("<img src=\"/Play/I/btn2_close.gif\" alt=\"关闭歌曲播放器\" name=\"PTAB\" width=\"21\" height=\"30\" border=\"0\" align=\"absmiddle\" onClick=\"window.close();\"></td><td width=\"4\"><img src=\"/Play/I/rright.gif\" width=\"4\" height=\"30\"></td></tr></table></td></tr><tr><td valign=\"top\" bgcolor=\"#F7F7F7\"><table width=\"100%\" height=\"306\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td valign=\"top\" class=\"simpleLeft\"><div id=\"playlist\"><span style=\"color:#C1C1C1; \">&nbsp;&nbsp;正在加载歌曲列表...</span></div></td><td width=\"1\" height=\"100%\" bgcolor=\"#B4B6B9\"></td></tr></table></td></tr></table></td></tr><tr><td height=\"1\" colspan=\"2\" bgcolor=\"#B4B6B9\"></td></tr></table><table width=\"772\"  border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\"><tr><td height=\"30\" class=\"l\">&nbsp;复制本首歌曲地址发给好友：</td><td><table width=\"30\" border=\"0\" align=\"left\" cellpadding=\"0\" cellspacing=\"0\"><tr><td><input name=\"url\" style=\"border:#999999 1px solid;\" type=\"text\" id=\"url\" size=\"55\"></td></tr></table></td>");
document.writeln("<td><img src=\"/Images/b_url.gif\" alt=\"复制歌曲地址\" width=\"75\" height=\"24\" class=\"h\" onClick=\"copyUrl();\"></td><td><img src=\"/Images/b_fav.gif\" alt=\"将歌曲收藏到我的收藏夹\" width=\"75\" height=\"24\" class=\"h\" onClick=\"window.external.AddFavorite(document.location.href,document.title);\"></td></tr></table>");
function getText(strName){
return document.getElementById(strName).innerText;
}
//数据初始化
var CurrentPlayIndex=0,bolMultPlay=true;
var objPlayer=document.getElementById("CN772Player");
if(typeof(aryPlayList)=="undefined"){//播放单曲
var aryPlayList=new Array(0);
aryPlayList[0]=new Array(getText("Song"),getText("SongUrl"),getText("Artist"),getText("Album"),getText("PubCorp"),getText("PubDate"),getText("ArtistID") + "-" + getText("AlbumID") + "-" + getText("SongID"),getText("LyricID"));
bolMultPlay=false;
}
if ((aryPlayList[0][1] == null) || (aryPlayList[0][1]=="")) {
alert("您好！系统检测到您的浏览器与本站不兼容哦。\n本站推荐您使用IE、腾讯TT等兼容浏览器来本站听歌哦！");
window.location.replace("/index.html");
}
else {
Cookie("AuthString", cookieStr, 15);
objPlayer.url=DataUrl+aryPlayList[0][1];
}
//播放器相关配置信息//
var isFirstLoadLrc = true;//是否是第一次加载歌词
var isSetPlayerEnv = false;//是否已经设置过播放器的属性和事件
var timerPlayerEnv;//播放器事件同步计时器
var timerPlayerTime;//控制操作提示时间显示同步计时器
var timerCaption;//控制歌曲信息同步计时器
var timerPlayNext;//下一首同步计时器
var timerBuffer;//缓冲同步计时器
var aryCaption;//歌曲信息数组
var objMainLrc,objHTTP;
var objLrcBg=document.getElementById("LrcBG");
var objCaption=document.getElementById("Caption");
var objIMG=document.getElementById("StateIMG");
var objTimeLine=document.getElementById("TimeLine");
function initLrcDiv(){
if(parseInt(aryPlayList[CurrentPlayIndex][7])==0){
objLrcBg.style.backgroundImage="url('/Play/I/" + new Date().getDay() + ".gif')";
objLrcBg.vAlign="bottom";
objLrcBg.innerHTML="&nbsp;&nbsp;<span id=\"LrcBox1\" class=\"g bold\">" + aryPlayList[CurrentPlayIndex][0] + "歌曲暂无歌词！</span><br><br>";
return;
}
objLrcBg.innerHTML="<div id=\"LrcDiv\"><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" id=\"LrcMainTable\"><tr><td><span id=\"LrcBox1\">歌曲缓冲或LRC歌词加载...</span><div id=\"LrcHightLine1\" class=\"LrcHightLine\"></div></td></tr></table></div>";
}
initLrcDiv();setPlayEvent();
function setPlayEvent(){
var strInitText=document.getElementById("LrcBox1").innerText;
playStateAction(objPlayer.playState);//追加事件
if((strInitText.indexOf("歌曲缓冲或LRC歌词加载")>-1) || (strInitText.indexOf("歌曲暂无歌词")>-1)){
playStateAction(objPlayer.playState);//追加事件
timerPlayerEnv=setTimeout("setPlayEvent()",750);
//document.getElementById("LrcBox1").innerText=strInitText.replace("歌曲暂无歌词",",我们将立即添加");
}
else{clearTimeout(timerPlayerEnv);}
if(isSetPlayerEnv == false)isSetPlayerEnv = true;
}
function playStateAction(NewState) {
switch(NewState){
case(1) : 
strTip="已停止.";
stateIMG("stop",strTip);;
break;
case(2) : 
strTip="已暂停."; 
stateIMG("pause",strTip);
break;
case(3):
clearTimeout(timerPlayNext);
Cookie("AuthString", "",-1);//DelCookie
var itemInfo=aryPlayList[CurrentPlayIndex];
document.title= "正在播放歌曲"+ itemInfo[0];
stateIMG("play","正在播放歌曲"+ itemInfo[0]);
aryCaption=Array("歌曲:"+ itemInfo[0],"专辑:" + itemInfo[3],"歌手:" + itemInfo[2]);
if (itemInfo[4]!="-")aryCaption[aryCaption.length]="专辑发行:" + itemInfo[4];
if (itemInfo[5]!="-")aryCaption[aryCaption.length]="上市日期:" + itemInfo[5];
aryCaption[aryCaption.length]="本站永久免费听歌网址:m.772.cn";
if (bolMultPlay==false){//单播加载歌词
if (!objMainLrc && parseInt(aryPlayList[CurrentPlayIndex][7])>0 && LrcContainer.innerText!=""){
objMainLrc= new clsLyric(LrcContainer.innerHTML);
LrcLoading();
}
}
else{//连播加载歌词，只需要受动加载第一次后，系统即可自动加载，因为第一次的歌曲播放由播放器自身触发的
if(isFirstLoadLrc){LoadLrc(CurrentPlayIndex);isFirstLoadLrc=false;}
}
getPlayTime();toLog();break;
case(4):strTip="快进...";break;
case(5):strTip="快退..."; break;
case(6):strTip="缓冲处理:完成" + objPlayer.network.bufferingProgress + "%"; break;
case(7):strTip="正在连接媒体..."; break;
case(8): 
strTip="播放完成.";
stateIMG("stop",strTip);
timerPlayNext=setTimeout("playItem(" + (CurrentPlayIndex+1) +")",1800);//播放下一首 
break;
case(9):strTip="正在连接媒体...";stateIMG("stop",strTip);break;
case(10):strTip="准备就绪.";stateIMG("stop",strTip);break;
case(11):strTip="重新连接中...";stateIMG("stop",strTip);break;
default : 
strTip="发生未知错误.";
stateIMG("stop",strTip);
break;
}	
if(NewState==3){displayCaption(aryCaption,0);}
else{
clearTimeout(timerCaption);//清除定时器
objCaption.innerHTML = strTip;
}
}
function displayCaption(aryCaption,aryIndex){
if(aryIndex>=aryCaption.length)aryIndex=0;
clearTimeout(timerCaption);
objCaption.innerHTML=aryCaption[aryIndex];
timerCaption=setTimeout("displayCaption(aryCaption," + (aryIndex+1) +")",3500);
}
function openStateAction(NewState){
if(NewState==21)Cookie("AuthString",cookieStr,10);
}
function getPlaylist(){
var strTip = "";
var tmpColor="#FFFFFF";
var count = aryPlayList.length;
strTip = "<table width=100% style=table-layout:fixed; cellpadding=0 cellspacing=0>\n";
for(i=0;i<=count-1;i++) {
var itemname = aryPlayList[i][0];
var n = i+1;
tmpColor=(n % 2 ==0)?"#FDFDFD":"#FFFFFF";
strTip += "<tr bgcolor=\""+tmpColor+"\"><td align=right id='no'>"+n+" 、</td><td nowrap title=\""+itemname+"\"><span class=h onclick=\"playItem("+i+");\">"+itemname+"</span></td><td align=right width=100><span onclick=\"playItem("+i+");\" class=h>播放</span> <a href=\"/ShowLrc.html?"+ (aryPlayList[i][8]!=null?aryPlayList[i][8]:escape(document.location.href)) + "&" + itemname + "\" title=\" 查看或下载 " + itemname + " 歌曲歌词\" target=_blank>歌词</a> <a href=\"" + DataUrl+aryPlayList[i][1] + "\" onmousedown=\"Down();\" title=\" 下载方法：单击鼠标右键并选择 目标另存为... 即可；特别注意：直接下载或使用下载软件均无法下载。\">下载</a>&nbsp;</td></tr>";
}
//strTip +="<tr><td colspan=3 align=center style='width:99%;height:90px;'><iframe src='/AD/NewGG/LJ.html' width=460 height=20 scrolling=no marginwidth=0 marginheight=0 frameborder=0 vspace=0 hspace=0></iframe><br><iframe src='/AD/NewGG/468.html' width=460 height=60 scrolling=no marginwidth=0 marginheight=0 frameborder=0 vspace=0 hspace=0></iframe></td></tr></table>";
strTip +="</table>";
document.getElementById("playlist").innerHTML = strTip;
}
//绑定事件到播放器
document.writeln("<script for=\"CN772Player\" event=\"playStateChange(NewState)\">");
document.writeln("playStateAction(NewState);");
document.writeln("</script>");
document.writeln("<script for=\"CN772Player\" event=\"openStateChange(NewState)\">");
document.writeln("openStateAction(NewState);");
document.writeln("</script>");
document.writeln("<script for=\"CN772Player\" event=\"buffering(Start)\">");
document.writeln("if(Start){timerBuffer=window.setInterval(\"playStateAction(objPlayer.playState)\",1000);}else{window.clearInterval(timerBuffer);}");
document.writeln("</script>");
//得到播放列表//
getPlaylist();
function openItem(url) {
objPlayer.controls.stop();
objPlayer.URL = url;
objPlayer.controls.play();
}
function playItem(no) {
if (no<0) {
no=aryPlayList.length-1;
}
if (no>aryPlayList.length-1){
no=0;
}
//判断是否为新的歌曲
if (CurrentPlayIndex!=no){
//先要改变要播放的歌曲值，否则会出现歌曲与歌词不同步的情况，也不便于清空歌词容器
CurrentPlayIndex=no;
openItem(DataUrl + aryPlayList[no][1]);//加载新歌
LoadLrc(no);
}
else{//仍然是播放同一首歌
objPlayer.controls.play();
}
}
function LoadLrc(no){
//清空上一首歌曲的歌词，并重新初始化歌词播放器容器值
initLrcDiv();
LrcMainTable=getObj("LrcMainTable");
lngLrcOffset=0;
lngLrcOffsetTop=0;
lngLrcOffsetBottom=0;
objMainLrc=null;
bolMoving = false;
bolMoveAble = false;
LrcPrevLine = 0;
LrcCurrentLine = 0;
clearTimeout(objTimerRunning);
clearTimeout(objTimerColor);
clearTimeout(objTimerMoveTop);
if (parseInt(aryPlayList[no][7])>0){//存在歌词则加载歌词
	var strNewLyric=getServerData(getSongPath(aryPlayList[no][8]));
	if (strNewLyric==null || strNewLyric==""){
		alert("加载歌词失败，请尝试刷新播放页尝试！ ");
	}
	else{
		strNewLyric=MidExt(strNewLyric,"<span id=\"LrcContainer\">","</span>");
		objMainLrc= new clsLyric(strNewLyric);
		LrcLoading();
	}
}
}
// 播放的位置和时间控制
function getPlayTime() {
if(objPlayer!= null){
if(objPlayer.playState == 3 && objPlayer.network.bufferingProgress==100){
objTimeLine.innerHTML = objPlayer.Controls.currentPositionString + "/" + objPlayer.currentMedia.durationString;
}
else{
objTimeLine.innerText="";
}
}
}
timerPlayerTime=setInterval("getPlayTime()",1000);
// 图片显示控制
function stateIMG(sSrc,sAlt) {
objIMG.src="/Play/I/" + sSrc + ".gif";
objIMG.alt=sAlt;
}
// WriteLog
function toLog(){
var logInfo=aryPlayList[CurrentPlayIndex][6].split("-");
if(!isNaN(parseInt(logInfo[2]))){
var oImg=new Image();
oImg.src="http://stat.772.cc/stat.asp?0&"+ logInfo[2] + "&Song";
}
}
function Down() {
if(Cookie("CAD")!="YES"){
//alert("支持本站发展，请顺手帮忙点下GOOGLE投放的广告，非常谢谢。\n本站音乐永久免费试听下载！");
Cookie("CAD","YES", 900);
}
if((event.button==2) || (event.button==3)){
Cookie("DownString", cookieStr, 10);
}
else{
alert("下载方法：单击鼠标右键并选择 目标另存为... 即可；\n\n特别注意：直接下载或使用下载软件均无法下载。");
}
}
function btn_Over(){
var o=event.srcElement;
o.src=o.src.replace(".gif","_c.gif");
}
function btn_Out(){
var o=event.srcElement;
o.src=o.src.replace("_c.gif",".gif");
}
function AttEvent(){
var aryImg=document.getElementsByName("PTAB");
for(i=0;i<aryImg.length;i++){
aryImg[i].className="h";
aryImg[i].onmouseover=btn_Over;
aryImg[i].onmouseout=btn_Out;
}
}
AttEvent();
var objTimerRunning, objTimerColor, objTimerMoveTop;
var bolMoving = false,bolMoveAble = false;
var lngLrcTopPostion;
var LrcPrevLine = 0,LrcCurrentLine = 0,d=document,LrcMainTable=getObj("LrcMainTable");
var lngLrcOffset=0,lngLrcOffsetTop=0,lngLrcOffsetBottom=0;//控制前进和后退歌词
function clsLyric(strLyric){
strLyric= "[00:00.00]此歌词由亲亲我音乐网(m.772.cn)收集整理\n[00:06.00]亲亲我音乐网为您提供永久免费音乐服务:)\n" + strLyric;
this.aryLrcLine = new Array();
this.lngDelaySecond = 0;
this.dts = -1; 
this.dte = -1;
this.dlt = -1;
this.ddh;
this.fjh;
if(/\[offset\:(\-?\d+)\]/i.test(strLyric)){
this.lngDelaySecond = RegExp.$1/1000;
}
strLyric = strLyric.replace(/\[\:\][^$\n]*(\n|$)/g,"$1");
strLyric = strLyric.replace(/\[[^\[\]\:]*\]/g,"");
strLyric = strLyric.replace(/\[[^\[\]]*[^\[\]\d]+[^\[\]]*\:[^\[\]]*\]/g,"");
strLyric = strLyric.replace(/\[[^\[\]]*\:[^\[\]]*[^\[\]\d\.]+[^\[\]]*\]/g,"");
strLyric = strLyric.replace(/<[^<>]*[^<>\d]+[^<>]*\:[^<>]*>/g,"");
strLyric = strLyric.replace(/<[^<>]*\:[^<>]*[^<>\d\.]+[^<>]*>/g,"");
while(/\[[^\[\]]+\:[^\[\]]+\]/.test(strLyric)){
strLyric = strLyric.replace(/((\[[^\[\]]+\:[^\[\]]+\])+[^\[\r\n]*)[^\[]*/,"\n");
var zzzt = RegExp.$1;
/^(.+\])([^\]]*)$/.exec(zzzt);
var ltxt = RegExp.$2;
var eft = RegExp.$1.slice(1,-1).split("][");
for(var ii=0; ii<eft.length; ii++){
var sf = eft[ii].split(":");
var tse = parseInt(sf[0],10) * 60 + parseFloat(sf[1]);
var sso = { t:[] , w:[] , n:ltxt }
sso.t[0] = tse-this.lngDelaySecond;
this.aryLrcLine[this.aryLrcLine.length] = sso;
}
}
this.aryLrcLine = this.aryLrcLine.sort( function(a,b){return a.t[0]-b.t[0];} );
for(var ii=0; ii<this.aryLrcLine.length; ii++){
while(/<[^<>]+\:[^<>]+>/.test(this.aryLrcLine[ii].n)){
this.aryLrcLine[ii].n = this.aryLrcLine[ii].n.replace(/<(\d+)\:([\d\.]+)>/,"%=%");
var tse = parseInt(RegExp.$1,10) * 60 + parseFloat(RegExp.$2);
this.aryLrcLine[ii].t[this.aryLrcLine[ii].t.length] = tse-this.lngDelaySecond;
}
LrcHightLine1.innerHTML = "<span>"+ this.aryLrcLine[ii].n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/%=%/g,"</span><span>") +" </span>";
var fall = LrcHightLine1.getElementsByTagName("span");
for(var wi=0; wi<fall.length; wi++)
this.aryLrcLine[ii].w[this.aryLrcLine[ii].w.length] = fall[wi].offsetWidth;
this.aryLrcLine[ii].n = LrcHightLine1.innerText;
}
this.appendTR = function(intLine){
var oRow=LrcMainTable.insertRow(LrcMainTable.rows.length);//插入新行
oRow.style.position="relative";
oRow.style.top="-" + ((intLine-1)*20) + "px";//intLine从2开始
var oCell=oRow.insertCell();//在新行中插入一单元格
var strHTML="<span id=\"LrcBox"+intLine+"\"></span><div id=\"LrcHightLine"+intLine+"\" class=\"LrcHightLine\"></div>";
oCell.innerHTML=strHTML;
}
this.delTR = function(){
var j=1;
for (j=1;j<LrcMainTable.rows.length;j++){
	LrcMainTable.deleteRow(j);
}
}
this.setOffsetTop = function(){
var ii;
for(ii=this.aryLrcLine.length-1; ii>0 && this.aryLrcLine[ii].t[0]>lngLrcOffset; ii--){}
lngLrcOffsetTop = ii;
}

this.setOffsetBottom = function(){
var lngPos=objPlayer.currentMedia.duration;
if(lngPos>0)  {
var ii;
for(ii=this.aryLrcLine.length-1; ii>0 && this.aryLrcLine[ii].t[0]-lngLrcOffset>=lngPos; ii--){}
lngLrcOffsetBottom = ii;
}
}

this.run = function(objPlayerPosition){
if(objPlayerPosition<this.dts || objPlayerPosition>=this.dte){
var ii;
for(ii=this.aryLrcLine.length-1; ii>=0 && this.aryLrcLine[ii].t[0]>objPlayerPosition; ii--){}
if(ii<0) return;
this.ddh = this.aryLrcLine[ii].t;
this.fjh = this.aryLrcLine[ii].w;
this.dts = this.aryLrcLine[ii].t[0];
this.dte = (ii<this.aryLrcLine.length-1)?this.aryLrcLine[ii+1].t[0]:objPlayer.currentMedia.duration;

if(!bolMoveAble){
lngLrcTopPostion = 140;
LrcMainTable.style.pixelTop = 140;
lowlight(LrcBox1);
for(var wi=1; wi<=this.aryLrcLine.length; wi++){
if(getObj("LrcBox"+wi)==null){//不存在该对象，则追加
this.appendTR(wi);
}
getObj("LrcBox"+wi).innerText = this.aryLrcLine[wi-1].n;
getObj("LrcHightLine"+wi).innerText = this.aryLrcLine[wi-1].n;
}
bolMoveAble = true;
}
if(this.dlt>0) lowcolor(getObj("LrcHightLine"+this.dlt));
if(this.dlt==ii-1){
LrcPrevLine = this.dlt+1;
if(LrcPrevLine>0 && getObj("LrcHightLine"+LrcPrevLine).style.width!="100%") getObj("LrcHightLine"+LrcPrevLine).style.width = "100%";
if(LrcPrevLine>0) highcolor(0,this.dte-this.dts);
toposition(1,this.dte-this.dts);
}
if(ii-this.dlt>1 || ii-this.dlt<=-1){
if(this.dlt==-1 || ii==0){
jumpto(ii-this.dlt-1);
toposition(1,this.dte-this.dts);
}
else
jumpto(ii-this.dlt);
if(this.dlt>=0) lowcolor(getObj("LrcHightLine"+(this.dlt+1)));
}
if(this.dlt>=0) lowlight(getObj("LrcBox"+(this.dlt+1)));
this.dlt = ii;
LrcCurrentLine = ii;
highlight(getObj("LrcBox"+(this.dlt+1)));
}
var bbw = 0;
var ki;
for(ki=0; ki<this.ddh.length && this.ddh[ki]<=objPlayerPosition; ki++)
bbw += this.fjh[ki];
var kt = ki-1;
var sc = ((ki<this.ddh.length)?this.ddh[ki]:this.dte) - this.ddh[kt];
var tc = objPlayerPosition - this.ddh[kt];
bbw -= this.fjh[kt] - tc / sc * this.fjh[kt];
if(bbw>getObj("LrcBox"+(this.dlt+1)).offsetWidth)
bbw = getObj("LrcBox"+(this.dlt+1)).offsetWidth;
getObj("LrcHightLine"+(this.dlt+1)).style.width = Math.round(bbw) + "px";
}
LrcBox1.innerHTML = "";
}
function getObj(objName){
return d.getElementById(objName);
}
function LrcLoading(){
if(!objPlayer)return;
if(parseInt(aryPlayList[CurrentPlayIndex][7])==0)return;//若当前无歌词则退出系统
with(objPlayer){
objMainLrc.run(controls.currentPosition+lngLrcOffset);
}
if(arguments.length==0) objTimerRunning = setTimeout("LrcLoading()",10);
}
function jumpto(nline){
lngLrcTopPostion -= 20*nline;
LrcMainTable.style.top = lngLrcTopPostion;
}

function toposition(step,dur){
if(bolMoving){
clearTimeout(objTimerMoveTop);
return;
}
LrcMainTable.style.top = lngLrcTopPostion--;
if(step<20){
step++;
objTimerMoveTop=setTimeout("toposition("+step+","+dur+");",dur*5);
}
}
function highcolor(step,dur){
if(bolMoving) return;
getObj("LrcHightLine"+LrcPrevLine).filters.alpha.opacity = 100-(step++)*10;
if(step<15){
objTimerColor = setTimeout("highcolor("+step+","+dur+");",dur*8);
}
}
function highlight(lid){
lid.style.color = "#00FF00";
}
function lowcolor(lid){
clearTimeout(objTimerColor);
lid.style.width = "0px";
lid.filters.alpha.opacity = 100;
}
function lowlight(lid){
lid.style.color = "#6B85DF";
}
function setLrc(intSecond){
lngLrcOffset += intSecond;
if(intSecond==0){
lngLrcOffset=0;
lngLrcOffsetTop=0;
lngLrcOffsetBottom=0;
window.status=" 歌词同步时间恢复默认值！ ";
}
else if(intSecond>0)
window.status=" 歌词已前进 " + intSecond + " 秒！ ";
else
window.status=" 歌词已后退 " + intSecond + " 秒！ ";
objMainLrc.setOffsetBottom();
objMainLrc.setOffsetTop();
}

function getServerData(Url,intRetry){
if (!objHTTP){
try {
objHTTP = new XMLHttpobjHTTP();
} catch (trymicrosoft) {
 try {
   objHTTP = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (othermicrosoft) {
   try {
	 objHTTP = new ActiveXObject("Microsoft.XMLHTTP");
   } catch (failed) {
	 objHTTP = false;
   }  
 }
}
if (!objHTTP){
alert(" 您的浏览器无法创建XMLHttpobjHTTP请求对象,可能您的浏览器版本过低!");
window.location.replace("/index.html");
}
}
try{
//检查或创建XMLHTTP对象成功!
objHTTP.open("GET",Url,false);
objHTTP.send();
}
catch (e) {	
	window.status=" 错误号： " + e.Number + " ，错误描述： " + e.description;
}
//错误处理
if (objHTTP.readyState == 4){
if (objHTTP.status == 200){
return objHTTP.responseText;
}
else if (objHTTP.status == 404){
window.status="请求的歌曲歌词没有找到!";
return "[00:03.00]歌词暂时不存在，我们将稍候加入该歌词！ ";
}
else{
intRetry=(intRetry!=null?intRetry:0);
intRetry++;
if(intRetry>=5){
	return "[00:03.00]获取歌词发生错误:HTTP 1.1 / " + objHTTP.status + " ，请刷新播放页面尝试！ ";
}
window.status="获取歌词发生错误:HTTP 1.1 / " + objHTTP.status + " ，正在重试(" + intRetry + " 次)...";
return getServerData(Url,intRetry);
}
}
}
//////得到指定字符之间的字符//////
function MidExt(strExpression, FindBeginString, FindEndString, KeepFindString, Start){
	var reVal="";
    if ((strExpression == "") || (FindBeginString == "") || (FindEndString == "")){
        reVal = strExpression;
        return reVal;
    }
	if (!KeepFindString)KeepFindString=false;
	if (!Start)Start=0;
    strExpression = Mid(strExpression, Start);	
    var FindBeginStringLen, FindEndStringLen, tmpStr, FindBeginStringPos, FindEndStringPos;
    FindBeginStringLen = Len(FindBeginString);
    FindEndStringLen = Len(FindEndString);
    FindBeginStringPos = Instr(LCase(strExpression), LCase(FindBeginString));
    FindEndStringPos = Instr(LCase(strExpression), LCase(FindEndString));
    if ((FindBeginStringPos == -1) || (FindEndStringPos == -1)){
        reVal = strExpression;
        return reVal;
    }
    tmpStr = Mid(strExpression, FindBeginStringPos + FindBeginStringLen);
    tmpStr = Mid(tmpStr, 0, Instr(LCase(tmpStr), LCase(FindEndString)));
    if (KeepFindString == false){
        reVal = tmpStr;
	}
    else{
        reVal = FindBeginString & tmpStr & FindEndString;
    }
	return reVal;
}
function getSongPath(strSongInfo){//得到即将需要播放的歌曲路径信息
if(bolMultPlay==false){//播放单曲则直接返回当前路径 
return document.location.href;
}
else{//连播歌曲
var aryPathInfo=strSongInfo.split("O");
var strGenreTypePath="";
switch (parseInt(aryPathInfo[0])){
   case 1:
   strGenreTypePath="huarennanyin";break;
   case 2:
   strGenreTypePath="huarennvyin";break;
   case 3:
   strGenreTypePath="huarenzuhe";break;
   case 4:
   strGenreTypePath="yingshigequ";break;
   case 5:
   strGenreTypePath="rihannanyin";break;
   case 6:
   strGenreTypePath="rihannvyin";break;
   case 7:
   strGenreTypePath="rihanzuhe";break;
   case 9:
   strGenreTypePath="oumeigeshou";break;
   case 10:
   strGenreTypePath="minantaiyu";break;
   case 11:
   strGenreTypePath="ertonggequ";break;
   case 12:
   strGenreTypePath="yinyuexinshang";break;
   case 13:
   strGenreTypePath="yaogunwuqu";break;
   case 14:
   strGenreTypePath="huaijiuzhencang";
   default: 
   strGenreTypePath="qinggeduichang";break;
}
return "http://" + document.location.hostname + "/" + strGenreTypePath  + "/Song/" + Right("000000" + aryPathInfo[1],6) + ".html";
}
}

function ReportError(){
	var itemInfo=aryPlayList[CurrentPlayIndex];
	window.open("http://m.772.cn/ReportErrorLyric.asp?" + escape(itemInfo[6].split("-")[2] + "|" + itemInfo[7] + "|" +  itemInfo[0] + "|" +  itemInfo[3] + "|" +  itemInfo[2]) ,"Err");
}
var obj=document.getElementById("url");
obj.value=document.location.href;
function copyUrl(){
if (obj) {
obj.select();
js=obj.createTextRange();
js.execCommand("Copy");
alert(" 地址已经复制，您可以将它粘贴到任何位置了，如QQ、BBS、聊天室等。 ");
}
}
