var Cs, St;
var rorw="";
var lrcT;
function getname(songname){
if(songname==""){
names=$("name").value;
}else{
names=songname;
}
geturl();
}
function geturl(){
AJAXCALL("inc/songurl.asp?type=url1&keyword="+names,"musiclist","isXML=true");
addbox(names);
}
function top(){
AJAXCALL("inc/songlist.asp?ac=new","toplist","isXML=true");
}
function toplist(doc){
var items=getElementsByClass(doc,"item");
var linker=new Array();
var linkers=new Array();
var tmp="
- ";
- '+d+'. 复制代码 代码如下:
for(var i=0;i
{
linker[i]="";
linkers[i]="";
}
else
{
linker[i]="("+getTagValue(items[i], 'singer').replace(/ /g," ")+")";
linkers[i]=" "+getTagValue(items[i], 'singer').replace(/ /g," ");
}
var d=i+1;
tmp+='
function setcookie(name,value){
var Days = 30;
var exp = new Date();
exp.setTime(exp.getTime() + Days*24*60*60*1000);
document.cookie = name + "="+ escape(value) +";expires="+ exp.toGMTString();
}
function getcookie(name){
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr != null) return unescape(arr[2]); return null;
}
setcookie("box",getcookie("box"));
function addbox(name){
var a1=name+"|*|";
var box=getcookie("box");
box=box.replace(a1,"");
var value=a1+box;
setcookie("box",value);
listbox();
}
function delbox(name){
var del=name+"|*|";
var s=getcookie("box");
s = s.replace(del, "");
setcookie("box",s);
listbox();
}
function listbox(){
var tmp="";
var s2=getcookie("box");
var s3=s2.split("|*|");
var s4=s3.length-1;
if(s4>8) $("boxlist").style.height="139px";
for(var i=0;i
}
$("boxlist").innerHTML=tmp;
}
function GetEBID(id){return document.getElementById(id);}
function To(t){
if(rorw=="") return;
if(rorw=="rmp" && RPlayer.GetPlayState()==3) RPlayer.SetPosition(t*1000);
if(rorw=="wmp" && MPlayer.playState==3) MPlayer.controls.CurrentPosition=t;
}
function lrcrun(){
var rtl="|"+tl;
if((rtl.indexOf("|"+Cs+"|")) != -1){
GetEBID("LrcDiv").scrollTop=GetEBID("LrcDiv").offsetTop-parseInt(GetEBID("LrcDiv").offsetHeight/2)+GetEBID("T_"+Cs).offsetTop+10;
GetEBID("T_"+St).className="";
GetEBID("T_"+Cs).className="b";
St=Cs;
}
}
function ldL(){
if(rorw=="rmp" && RPlayer.GetPlayState()==3) {Cs=Math.floor(RPlayer.GetPosition()/1000); lrcrun();}
if(rorw=="wmp" && MPlayer.playState==3) {Cs=Math.floor(MPlayer.controls.CurrentPosition); lrcrun();}
lrcT=setTimeout("ldL()", 10);
}