<!--#include file="conn.asp"-->
<!--#include file="path.asp"-->
<!--#include file="stAR.INC"-->
<!--#include file="inc/noip.asp"-->
<!--#include file="sql.asp"--> 
<%
id=request.QueryString("id")
If id="" Then
	Response.Write ("<SCRIPT language=JavaScript>alert('错误!\n\n您至少需要选择一首歌曲');javascript:window.close();</SCRIPT>")
	Response.end
End If
set rs=server.createobject("adodb.recordset")
sql="select LrcWords,MusicName from [LrcWord] where id ="&id
	rs.open sql,conn,1,3
	If not rs.eof Then   
		LrcWords=rs("LrcWords")
		MusicName=rs("MusicName")

%>
<%  
End If
rs.close
conn.close
set rs=nothing
%>
<html>
<head>
<title><%=MusicName%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE TYPE="text/css">
<!--
#lrcollbox td, #lrcollbox font
{ font-family: "新宋体"; font-size: 12px; font-weight: bold;}
#lrcoll td
{ color:#0080C0; cursor:default; }
#lrcbox
{ color:#00FF00 }
#lrcbc
{ color:#FFFF33 }
#lrcfilter
{ filter: alpha(opacity=0) }
body
{ cursor:url('http://www.ylmv.com/01.ani')} 
-->
</STYLE>
<script language='javascript'>
var lrc0;
ffbb = 0;
uu = "";

function lrcClass(tt)
{
  this.inr = [];

  this.oTime = 0;

  this.dts = -1;
  this.dte = -1;
  this.dlt = -1;
  this.ddh;
  this.fjh;

  lrcbc.style.width = 0;

  if(/\[offset\:(\-?\d+)\]/i.test(tt))
    this.oTime = RegExp.$1/1000;

  tt = tt.replace(/\[\:\][^$\n]*(\n|$)/g,"$1");
  tt = tt.replace(/\[[^\[\]\:]*\]/g,"");
  tt = tt.replace(/\[[^\[\]]*[^\[\]\d]+[^\[\]]*\:[^\[\]]*\]/g,"");
  tt = tt.replace(/\[[^\[\]]*\:[^\[\]]*[^\[\]\d\.]+[^\[\]]*\]/g,"");
  tt = tt.replace(/<[^<>]*[^<>\d]+[^<>]*\:[^<>]*>/g,"");
  tt = tt.replace(/<[^<>]*\:[^<>]*[^<>\d\.]+[^<>]*>/g,"");

  while(/\[[^\[\]]+\:[^\[\]]+\]/.test(tt))
  {
    tt = tt.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.oTime;
      this.inr[this.inr.length] = sso;
    }
  }
  this.inr = this.inr.sort( function(a,b){return a.t[0]-b.t[0];} );

  for(var ii=0; ii<this.inr.length; ii++)
  {
    while(/<[^<>]+\:[^<>]+>/.test(this.inr[ii].n))
    {
      this.inr[ii].n = this.inr[ii].n.replace(/<(\d+)\:([\d\.]+)>/,"%=%");
      var tse = parseInt(RegExp.$1,10) * 60 + parseFloat(RegExp.$2);
      this.inr[ii].t[this.inr[ii].t.length] = tse-this.oTime;
    }
    lrcbc.innerHTML = "<font>"+ this.inr[ii].n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/%=%/g,"</font><font>") +" </font>";
    var fall = lrcbc.getElementsByTagName("font");
    for(var wi=0; wi<fall.length; wi++)
      this.inr[ii].w[this.inr[ii].w.length] = fall[wi].offsetWidth;
    this.inr[ii].n = lrcbc.innerText;
  }

  this.run = function(tme)
  {
    if(tme<this.dts || tme>=this.dte)
    {
      var ii;
      for(ii=this.inr.length-1; ii>=0 && this.inr[ii].t[0]>tme; ii--){}
      if(ii<0) return;
      this.ddh = this.inr[ii].t;
      this.fjh = this.inr[ii].w;
      this.dts = this.inr[ii].t[0];
      this.dte = (ii<this.inr.length-1)?this.inr[ii+1].t[0]:smx.currentMedia.duration;

      lrcwt1.innerText = this.retxt(ii-5);
      lrcwt2.innerText = this.retxt(ii-4);
      lrcwt3.innerText = this.retxt(ii-3);
      lrcwt4.innerText = this.retxt(ii-2);
      lrcwt5.innerText = this.retxt(ii-1);
      lrcfilter.innerText = this.retxt(ii-1);
      lrcwt6.innerText = this.retxt(ii+1);
      lrcwt7.innerText = this.retxt(ii+2);
      lrcwt8.innerText = this.retxt(ii+3);
      lrcwt9.innerText = this.retxt(ii+4);
      this.print(this.retxt(ii));
      if(this.dlt==ii-1)
      {
clearTimeout(lrc0);
golrcoll(0);
golrcolor(0);
      }
      this.dlt = ii;
    }
    var bbw = 0;
    var ki;
    for(ki=0; ki<this.ddh.length && this.ddh[ki]<=tme; 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 = tme - this.ddh[kt];
    bbw -= this.fjh[kt] - tc / sc * this.fjh[kt];
    if(bbw>lrcbox.offsetWidth)
      bbw = lrcbox.offsetWidth;
    lrcbc.style.width = Math.round(bbw);
  }

  this.retxt = function(i)
  {
    return (i<0 || i>=this.inr.length)?"":this.inr[i].n;
  }

  this.print = function(txt)
  {
    lrcbox.innerText = txt;
    lrcbc.innerText = txt;
  }

  this.print("LRC同步歌词暂缺");
}

function loadfile()
{
  file.click();
  if(file.value=="" || file.value==uu) return;
  uu = file.value;
  url.value = uu;
  smx.url = uu;
  smx.controls.play();
}

function golrcoll(s)
{
  lrcoll.style.top = -2-(s++)*2;
  if(s<=9)
    lrc0 = setTimeout("golrcoll("+s+")",100);
}

function bb()
{
  ffbb = ffbb - 0.5;
}

function ff()
{
  ffbb = ffbb + 0.5;
}

function golrcolor(t)
{
  lrcfilter.filters.alpha.opacity = 100-(t++)*10;
  if(t<=10)
    setTimeout("golrcolor("+t+")",60);
}

function killErrors()
{
  return true;
}
window.onerror = killErrors;
function killErrors()
{
  return true;
}
window.onerror = killErrors;
</script>
</head>
<body bgcolor=eaeaea>
<table width="100%" border="0" align="center">
<tr> <td align=center>
  <input type='text' name='url' value='' maxlength='2047' style='cursor:default; height:20; width:210; font-size:9pt'> <input type='button' value='本地媒体' onclick='loadfile()' style='height:20; width:70; font-size:9pt' title='播放你本地的这首歌曲'><input type='file' name='file' style='display:none'></div>

<object classid='clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6' id=smx width=290 height=160>
<param name=url value=Play.Asp?ID=<%=id%>>
<param name=autostart value=true>
<param name=playcount value=100>
<param name=volume value=100>
</object>
<span id=lrcdata>
<!--

<%=LrcWords%>

-->
</span>
<div id=lrcollbox style='overflow:hidden; height:180; width:290; background-color:#000000'>
<table border=0 cellspacing=0 cellpadding=0 width='100%' id='lrcoll' style='position:relative; top: -20px' oncontextmenu='return false'>
<tr> <td nowrap height=20 align=center id=lrcwt1></td></tr>
<tr> <td nowrap height=20 align=center id=lrcwt2></td></tr>
<tr> <td nowrap height=20 align=center id=lrcwt3></td></tr>
<tr> <td nowrap height=20 align=center id=lrcwt4></td></tr>
<tr> <td nowrap height=20 align=center>
<table border=0 cellspacing=0 cellpadding=0>
<tr> <td nowrap height=20><span id=lrcwt5 style=height:20></span></td></tr>
<tr style='position:relative; top: -20px; z-index:6'> <td nowrap height=20><div id=lrcfilter style='overflow:hidden; width:100%; color:#FFFF33; height:20'></div></td></tr></table></td></tr>
<tr style='position:relative; top: -20px'> <td nowrap height=20 align=center>
<table border=0 cellspacing=0 cellpadding=0>
<tr> <td nowrap height=20><span id=lrcbox style='height:20'>歌词加载中···</span></td></tr>
<tr style='position:relative; top: -20px; z-index:6'> <td nowrap height=20><div id=lrcbc style='overflow:hidden; height:20; width:0'></div></td></tr></table></td></tr>
<tr style='position:relative; top: -40px'> <td nowrap height=20 align=center id=lrcwt6></td></tr>
<tr style='position:relative; top: -40px'> <td nowrap height=20 align=center id=lrcwt7></td></tr>
<tr style='position:relative; top: -40px'> <td nowrap height=20 align=center id=lrcwt8></td></tr>
<tr style='position:relative; top: -40px'> <td nowrap height=20 align=center id=lrcwt9></td></tr></table></td></tr></table>
<script language='javascript'>
function killErrors()
{
  return true;
}
window.onerror = killErrors;
lrcobj = new lrcClass(lrcdata.innerHTML.slice(4,-3));
function lrcrun()
{
  with(smx)
  {
    lrcobj.run(controls.currentPosition + ffbb);
  }
  if(arguments.length==0) setTimeout("lrcrun()",10);
}
lrcrun();
</script>


 </tr>
</table>
</div>
</body>
</html>
<body oncontextmenu='return false'="return false" onselectstart="return false" >
</body>