function loadUserList()
{
  home.load("BoxList");
  sstt = home.getAttribute("list");
  home.removeAttribute("list");
  return sstt;
}
function saveUserList(writebuff,pcount)
{
  var sstt = writebuff;
  home.setAttribute("list",sstt);
  home.setAttribute("listcount",pcount);
  home.save("BoxList");
  home.removeAttribute("list");
  home.removeAttribute("listcount");
}
var g_Browser = navigator.appName;
var period = 30000;
var icurr=0;
var pli= -1;
var pitem=[];
var pstr=loadUserList();
var pnode;
var pcou=0;
var g_opn=0;
var st=[];
var Rank=[];
var NSong=[];
var Pop=[];
var iDisplayArray=1;
 home.load("BoxList");
 pstr = home.getAttribute("list");
 pcou= home.getAttribute("listcount");
 home.removeAttribute("list");
 home.removeAttribute("listcount");
 if(pcou>300)
 {
	 alert("您收藏的歌曲数量已达上限,请编辑播放列表!");
	 svalue="";
 }
if(pstr!=null && pstr!="")
{
	pnode=pstr.split("|");
	pcou=pnode.length;
	g_opn=0;
	for(var i=0;i<pcou;i++)
	{
	 if(pnode[i]!="" && pnode[i]!=null)
	 {
	   pitem[g_opn]=pnode[i].split(",");
	   g_opn++;
	 }
	}
}
function clearLrc()
{
	var lc,lx;
  for(var ll=1;ll<11;ll++)
  {
	  lx=eval("lrcwt"+ll);
	  lx.innerHTML="";
	  lc=eval("lrcwt"+ll);
	  lc.innerHTML="";
  }
  lrcfilter.innerText = "";
  lrcbox.innerHTML ="";
  lrcbc.innerHTML = "";
 }
function play(rowi)
{
	if(pli==-1)
		pli=0;
	svalue="";
if(rowi==pli)
	{
	clearLrc();
	getGC('p',eval(rowi));
	oRow = ptb.rows[rowi];
	if(pitem[rowi][3] != null && pitem[rowi][3] != "")
		{
		oRow.cells[0].innerHTML = " <a ondblclick=\"play("+ eval(rowi)+");return(false);\" href=#><span class=\"style1\"> "+eval(rowi+1)+" "+pitem[rowi][3] +" - "+pitem[rowi][2]+"</span></a>";
		document.getElementById("s").innerHTML = "正在播放:" + pitem[rowi][3] + " - " + pitem[rowi][2];
		}
	else
		{
		oRow.cells[0].innerHTML ="<a ondblclick=\"play("+ eval(rowi)+");return(false);\" href=#><span class=\"style1\"> 1 "+pitem[rowi][2]+"</span></a>";
	document.getElementById("s").innerHTML = "正在播放:" + pitem[rowi][2];
		}
		oRow.cells[0].className="c";
	}
else
	{
	oRow = ptb.rows[rowi];
	if(pitem[rowi][3] != null && pitem[rowi][3] != "")
	{
		oRow.cells[0].innerHTML = " <a ondblclick=\"play("+ eval(rowi)+");return(false);\" href=#><span class=\"style1\"> "+eval(rowi+1)+" "+pitem[rowi][3] +" - "+pitem[rowi][2]+"</span></a>";
		oRow.cells[0].className="c";
		document.getElementById("s").innerHTML = "正在播放:" + pitem[rowi][3] + " - " + pitem[rowi][2];
	}
	else
	{
	oRow.cells[0].innerHTML ="<a ondblclick=\"play("+ eval(rowi)+");return(false);\" href=#><span class=\"style1\"> 1 "+pitem[rowi][2]+"</span></a>";
	oRow.cells[0].className="c";
	document.getElementById("s").innerHTML = "正在播放:" + pitem[rowi][2];
	}		

	clearLrc();
	getGC('p',eval(rowi));
	
	
	oRow = ptb.rows[pli];
	if(pitem[pli][3] != null && pitem[pli][3] != "")
		oRow.cells[0].innerHTML="<span class=style4> <span class=style5>"+eval(pli+1)+"</span> <a ondblclick=\"play("+eval(pli)+");return(false);\" href=#>"+pitem[pli][3] +" - "+pitem[pli][2]+"</a></span>";
	else
	{
	oRow.cells[0].innerHTML="<span class=style4> <span class=style5>"+eval(pli+1)+"</span> <a ondblclick=\"play("+eval(pli)+");return(false);\" href=#>"+pitem[pli][2]+"</a></span>";
	}
	oRow.cells[0].className="b";		
	pli = rowi;	
	}
}
function downall()
{
	var sbuff="";
	for(var i=0;i<g_opn;i++)
	{
		sbuff=sbuff+"<span>" + pitem[i][3] +" " + pitem[i][2];
		if(pitem[i][0].length==16)
		 sbuff=sbuff+"&id=" + pitem[i][0];
		sbuff=sbuff+"</span>";
	}
	var begindownspan = document.getElementById("myspan");
	begindownspan.innerHTML = "";
	begindownspan.innerHTML = sbuff;
	window.open("mp3down.htm");
}
function sp()
{
	switch(singlef)
	{
	 case 0:	
		singlef=1;
		pg.src="../img/music/n32.gif";
		pg.title="正在循环播放,点击后切换到单曲循环播放";
		break;
	 case 1:
		singlef=2;
		pg.src="../img/music/n10.gif";
		pg.title="正在单曲循环播放,点击后切换到随机循环播放"	;
		break;
	 case 2:
		singlef=3;
		pg.src="../img/music/n31.gif";
		pg.title="正在随机循环播放,点击后切换到单曲播放";
		break;
	case 3:
		singlef=0;
		pg.src="../img/music/n34.gif";
		pg.title="正在单曲播放,点击后切换到循环播放";
		break;
	}
}
function next()
{
	var rpli=0;
	var nextp=pli+1;
	if(pli > -1 && pli < g_opn - 1)
	{
		clearLrc();
		if(singlef==3)
		{			
			rpli = Math.floor(Math.random()*g_opn);
			while(rpli==pli)
			{
				rpli = Math.floor(Math.random()*g_opn);
			}
			nextp=rpli;
			if(nextp>=g_opn)
			{ 
				nextp=g_opn-1;
				if(nextp==pli)
				 nextp=pli+1;
			}
		}
		oRow = ptb.rows[nextp];
		if(pitem[nextp][3] != null && pitem[nextp][3] != "")
		{
			oRow.cells[0].innerHTML = "<a ondblclick=\"play("+ eval(nextp)+");return(false);\" href=#><span class=\"style1\"> "+eval(nextp+1)+" "+pitem[nextp][3] +" - "+pitem[nextp][2]+"</span></a>";
			oRow.cells[0].className="c";
			document.getElementById("s").innerHTML = "正在播放:" + pitem[nextp][3] + " - " + pitem[nextp][2];
		}
		else
		{
			oRow.cells[0].innerHTML = "<a ondblclick=\"play("+ eval(nextp)+");return(false);\" href=#><span class=\"style1\"> "+eval(nextp+1)+" "+pitem[nextp][2]+"</span></a>";
			oRow.cells[0].className="c";
			document.getElementById("s").innerHTML = "正在播放:" + pitem[nextp][2];
		}
		oRow.cells[0].focus();
		getGC('p',eval(nextp));
		oRow = ptb.rows[pli];
		if(pitem[pli][3] != null && pitem[pli][3] != "")
		{
			oRow.cells[0].innerHTML = "<span class=style4> <span class=style5> "+eval(pli+1)+" </span><a ondblclick=\"play("+ eval(pli)+");return(false);\" href=#>"+pitem[pli][3] +" - "+pitem[pli][2]+"</a></span>";
			oRow.cells[0].className="b";
		}
		else
		{
			oRow.cells[0].innerHTML = "<span class=style4> <span class=style5> "+eval(pli+1)+" </span><a ondblclick=\"play("+ eval(pli+1)+");return(false);\" href=#>"+pitem[pli][2]+"</a></span>";
			oRow.cells[0].className="b";
		}
		pli=nextp;
	}
	else if(pli>=g_opn-1)
	{
		clearLrc();
		oRow = ptb.rows[0];
		if(pitem[0][3] != null && pitem[0][3] != "")
		{
			oRow.cells[0].innerHTML = "<a ondblclick=\"play(0);return(false);\" href=#><span class=\"style1\"> 1 "+pitem[0][3] +" - "+pitem[0][2]+"</span></a>";
			oRow.cells[0].className="c";
			document.getElementById("s").innerHTML = "正在播放:" + pitem[0][3] + " - " + pitem[0][2];
		}
		else
		{
			oRow.cells[0].innerHTML = "<a ondblclick=\"play(0);return(false);\" href=#><span class=\"style1\"> 1 "+pitem[0][3] +" - "+pitem[0][2]+"</span></a>";
			oRow.cells[0].className="c";
			document.getElementById("s").innerHTML = "正在播放:" + pitem[rowi][2];
		}
		oRow.cells[0].focus();
		getGC('p',eval(0));
		oRow = ptb.rows[pli];
		if(pitem[pli][3] != null && pitem[pli][3] != "")
		{
			oRow.cells[0].innerHTML = "<span class=style4> <span class=style5> "+eval(pli+1)+" </span><a ondblclick=\"play("+ eval(pli)+");return(false);\" href=#>"+pitem[pli][3] +" - "+pitem[pli][2]+"</a></span>";
			oRow.cells[0].className="b";
		}
		else
		{
			oRow.cells[0].innerHTML = "<span class=style4> <span class=style5> "+eval(pli+1)+" </span><a ondblclick=\"play("+ eval(pli+1)+");return(false);\" href=#>"+pitem[pli][2]+"</a></span>";
			oRow.cells[0].className="b";
		}
		pli=0;
	}
}
function tglt()
{
	if(pls.style.display=='none')
	{
		pls.style.display='';
		tg.title="收起播放列表";
		
		tg.src="../img/music/n12.gif";
	}
	else
	{
		tg.title="展开播放列表";
		pls.style.display='none';
		tg.src="../img/music/n13.gif";
	}
}
function $(tag, cls, to, pos)
{
	var obj = document.createElement(tag);
	if(!valid(cls)) return obj;
	if(typeof(cls)=='string')obj.className = cls;
	else{pos=valid(to)?to:null;to=cls;}
	if (!isNull(to)) to.insertAdjacentElement(isNull(pos)?'beforeEnd':pos, obj);
	return obj;
}
function newitem(item)
{
	var oRow=ptb.insertRow();
	oRow.insertCell();	
	ptb.rows[0].className="b";	
}
function addlist(tid,rowi)
{
	var ids="";
	var newstr;
	var i,j;
	var item=[];
	var oRow;
	if(g_opn>=300)
	{
		alert("您收藏的歌曲数量已达上限,请编辑播放列表!");
		return;
	}
	if (tid == 1)
	{
		item[0]=Rank[rowi];
	}
	else if(tid == 2)
	{
		item[0]=NSong[rowi];
	}
	else if(tid == 3)
	{
		item[0]=Pop[rowi];
	}
	if(pstr != null && pstr != "")
	{
		var ret;
		var tmpsave="";
		var flag=0;
		if (tid == 1)
		{
			tmpsave=Rank[rowi][2]+","+Rank[rowi][3];
		}
		else if(tid == 2)
		{
			tmpsave=NSong[rowi][2]+","+NSong[rowi][3];
		}
		else if(tid == 3)
		{
			tmpsave=Pop[rowi][2]+","+Pop[rowi][3];
		}
		for (i=0;i<g_opn;i++)
		{
			var tmp = pitem[i][2]+","+pitem[i][3];
			ret = tmp.indexOf(tmpsave);
			if(ret != -1)
			{
				alert("此歌您已添加!");
				return;
			}
		}
		pstr=item[0][0]+','+item[0][1]+','+item[0][2]+','+item[0][3]+'|'+pstr;
	}
	else
	{
		pstr=item[0][0]+','+item[0][1]+','+item[0][2]+','+item[0][3];
	}
	for (i=0;i<=g_opn;i++)
	{
		if(i==0)
		{
			newitem(item);	
						
			oRow = ptb.rows[i];
			if(item[0][3]!="" & item[0][3]!=null)
			{
				oRow.cells[0].innerHTML = "<span class=style4> <span class=style5> "+eval(i+1)+" </span><a ondblclick=\"play("+ eval(i)+");return(false);\" href=#>"+item[i][3] +" - "+item[i][2]+"</a></span>";
				oRow.cells[0].className="b";

				if(tid == 1)
				{
					oRow = slId0.rows[rowi];
					oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√"+ "</span> " + Rank[rowi][3] + " - " + Rank[rowi][2] + "</span>";
					
				}
				else if(tid == 2)
				{
					oRow = slId1.rows[rowi];
					oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + NSong[rowi][3] + " - " + NSong[rowi][2] + "</span>";
				}
				else
				{
					oRow = slId2.rows[rowi];
					oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + Pop[rowi][3] + " - " + Pop[rowi][2] + "</span>";
				}
			}
			else
			{
				oRow.cells[0].innerHTML = "<span class=style4> <span class=style5> "+eval(i+1)+" </span><a ondblclick=\"play("+ eval(i)+");return(false);\" href=#>"+item[i][2]+"</a></span>";
				oRow.cells[0].className="b";
				
				if(tid == 1)
				{
					oRow = slId0.rows[rowi];
					oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√"+ "</span> " + Rank[rowi][2] + "</span>";
					
				}
				else if(tid == 2)
				{
					oRow = slId1.rows[rowi];
					oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + NSong[rowi][2] + "</span>";
				}
				else
				{
					oRow = slId2.rows[rowi];
					oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + Pop[rowi][2] + "</span>";
				}
			}
		}
		else
		{
			item[i]=pitem[i-1];
			oRow = ptb.rows[i];
			if(item[i][3] != null && item[i][3] != "")
			{
							
				if(i-1==pli)
				{
					oRow.cells[0].innerHTML = " <a ondblclick=\"play("+ eval(i)+");return(false);\" href=#><span class=\"style1\"> "+eval(i+1)+" "+item[i][3] +" - "+item[i][2]+"</span></a>";
				}
				else
				{
					oRow.cells[0].innerHTML = "<span class=style4> <span class=style5> "+eval(i+1)+" </span><a ondblclick=\"play("+ eval(i)+");return(false);\" href=#>"+item[i][3] +" - "+item[i][2]+"</a></span>";
				}
				oRow.cells[0].className="b";
			}
			else
			{
				if(i-1==pli)
				{
					oRow.cells[0].innerHTML = " <a ondblclick=\"play("+ eval(i)+");return(false);\" href=#><span class=\"style1\"> "+eval(i+1)+" "+item[i][2]+"</span></a>";
				}
				else
				{
					oRow.cells[0].innerHTML = "<span class=style4> <span class=style5> "+eval(i+1)+" </span><a ondblclick=\"play("+ eval(i)+");return(false);\" href=#>"+item[i][2]+"</a></span>";
				}
				oRow.cells[0].className="b";
			}
		}
	}
	pitem=item;
	g_opn++;
	if(g_opn==1)
	{	
		if(svalue=="")
		{	
			if(surl=="")
			   play(0);
					
			oRow = ptb.rows[0];
			if(item[0][3]!="" & item[0][3]!=null)
				oRow.cells[0].innerHTML = "<a ondblclick=\"play(0);return(false);\" href=#><span class=\"style1\"> 1 "+item[0][3] +" - "+item[0][2]+"</span></a>";
			else
				oRow.cells[0].innerHTML = "<a ondblclick=\"play(0);return(false);\" href=#><span class=\"style1\"> 1 "+item[0][2]+"</span></a>";
		  oRow.cells[0].className="b"; 
			pli=0;
		}
		else
		{
		
			oRow = ptb.rows[0];
			if(item[0][3]!="" & item[0][3]!=null)
				oRow.cells[0].innerHTML = "<span class=style4> <span class=style5> 1 </span><a ondblclick=\"play(0);return(false);\" href=#>"+item[0][3] +" - "+item[0][2]+"</a></span>";
			else
				oRow.cells[0].innerHTML = "<span class=style4> <span class=style5> 1 </span><a ondblclick=\"play(0);return(false);\" href=#>"+item[0][2]+"</a></span>";
			oRow.cells[0].className="b"; 
		}
	}
	else
	{
		if(svalue=="")
		pli++;
	}
	
	if(pli>=0 && pli<=ptb.rows.length-1)
		ptb.rows[pli].cells[0].className="c";
	saveUserList(pstr,g_opn);
}
function adds()
{
	var ids="";
	var tmppstr="|";
	var newstr;
	var i,j;
	var item=[];
	var oRow;
	var bcon=0;
	if(g_opn>=300)
	{
		alert("您收藏的歌曲数量已达上限,请编辑播放列表!");
		return;
	}
	if(pstr != null && pstr != "")
	{
		var ret;
		var tmpsave="";
		tmpsave=tmpw[2]+","+tmpw[3];		
		ret = pstr.indexOf(tmpsave);
		if(ret != -1)
		{
			
			if(!window.confirm("此歌曲已在列表中存在,是否替换?"))
			{
				if(tmpw[3]!="")
				document.getElementById("s").innerHTML = "正在试听:" +tmpw[3]+ " - "+tmpw[2];
				else
				document.getElementById("s").innerHTML = "正在试听:" +tmpw[2];
				return;
			}
			else
			{
				bcon=1;
			}
		}
		pstr=svalue +'|'+pstr;
	}
	else
	{
		pstr=svalue;
	}
	item[0] = tmpw;
	var j=0;
	for (i=0;i<=g_opn;i++)
	{
		if(i==0)
		{
			if(bcon != 1)
				newitem(tmpw);		
			oRow = ptb.rows[i];
			if(tmpw[3]!="" & tmpw[3]!=null)
			{
				oRow.cells[0].innerHTML = "<a ondblclick=\"play(0);return(false);\" href=#><span class=\"style1\"> 1 "+tmpw[3] +" - "+tmpw[2]+"</span></a>";
				document.getElementById("s").innerHTML = "正在播放:" + tmpw[3]+ " - " +tmpw[2];
			}
			else
			{
				oRow.cells[0].innerHTML = "<a ondblclick=\"play(0);return(false);\" href=#><span class=\"style1\"> 1 "+tmpw[2]+"</span></a>";
				document.getElementById("s").innerHTML = "正在播放:" +tmpw[2];
			}
		oRow.cells[0].className="b";
			pli=0;
			tmppstr += svalue;
			j++;
		}
		else
		{
			ids=pitem[i-1][2]+','+pitem[i-1][3];
			if(ids!=tmpsave)
			{
				item[j]=pitem[i-1];
				oRow = ptb.rows[j];
				if(item[j][3] != null && item[j][3] != "")
				{
					oRow.cells[0].innerHTML = "<span class=style4> <span class=style5> "+eval(j+1)+" </span><a ondblclick=\"play("+ eval(j)+");return(false);\" href=#>"+item[j][3] +" - "+item[j][2]+"</a></span>";
				}
				else
				{
					oRow.cells[0].innerHTML = "<span class=style4> <span class=style5> "+eval(j+1)+" </span><a ondblclick=\"play("+ eval(j)+");return(false);\" href=#>"+item[j][2]+"</a></span>";
				}
				oRow.cells[0].className="b";
				tmppstr +=  '|' + item[j][0] + ',' + item[j][1] + ',' + item[j][2] + ',' + item[j][3];
				j++;
			}
		}
	}
	pitem=item;
	if(bcon !=1)
	g_opn++;
	svalue="";
    pstr = tmppstr.slice(1);
	saveUserList(pstr,g_opn);
	
	if(pli>=0 && pli<=ptb.rows.length-1)
			ptb.rows[pli].cells[0].className="c";
	if(bcon !=1)
	{
		tmppstr = pitem[0][2] + "," + pitem[0][3];
		if(iDisplayArray == 1)
		{
			for(i = 0; i < Rank.length; i++)
			{
                newstr = Rank[i][2] + "," + Rank[i][3];
				if(newstr == tmppstr)
				{
					oRow = slId0.rows[i];
					if(Rank[i][3] != "" && Rank[i][3] != null)
					{
						oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + Rank[i][3] + " - " + Rank[i][2] + "</span>";
					}
					else
					{
						oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + Rank[i][2] + "</span>";
					}
				}
			}
		}
		else if(iDisplayArray == 2)
		{
			for(i = 0; i < NSong.length; i++)
			{
                newstr = NSong[i][2] + "," + NSong[i][3];
				if(newstr == tmppstr)
				{
					oRow = slId1.rows[i];
					if(NSong[i][3] != "" && NSong[i][3] != null)
					{
						oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + NSong[i][3] + " - " + NSong[i][2] + "</span>";
					}
					else
					{
						oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + NSong[i][2] + "</span>";
					}
				}
			}
		}
		else if(iDisplayArray == 3)
		{
			for(i = 0; i < Pop.length; i++)
			{
                newstr = Pop[i][2] + "," + Pop[i][3];
				if(newstr == tmppstr)
				{
					oRow = slId2.rows[i];
					if(Pop[i][3] != "" && Pop[i][3] != null)
					{
						oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + Pop[i][3] + " - " + Pop[i][2] + "</span>";
					}
					else
					{
						oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + Pop[i][2] + "</span>";
					}
				}
			}
		}
		else
		{

		}
	}
}
function opencon()
{
  window.showModalDialog("dj_editlist.htm", self, "dialogHeight:275px; dialogWidth:372px; status:no; help:0; scroll:0");
}
function AddAllList()
{
	switch(iDisplayArray)
	{
		case 1:
		{
			iMax=Rank.length;					
			break;
		}
		case 2:
		{	
			iMax=NSong.length;
			break;
		}
		case 3:
		{	
			iMax=Pop.length;
			break;
		}
		default:
		{
			iMax=0;
			break;
		}
	}	
	if(iMax<=0)
		return;		
	var iTmp=0;
	var ids="";
	var newstr;
	var i,j;
	var item=[];
	var oRow;
	var iPitemMax=g_opn;
		
	for(iTmp=0;iTmp<iMax;iTmp++)
	{	
			if(g_opn>=300)
			{
					alert("您收藏的歌曲数量已达上限,请编辑播放列表!");
					return;
			}
			switch(iDisplayArray)
			{
				case 1:
				{	
					oRow = slId0.rows[iTmp];
					item[0]=Rank[iTmp];			
					break;
				}
				case 2:
				{		
					oRow = slId1.rows[iTmp];
					item[0]=NSong[iTmp];			
					break;
				}
				default:
				{
						oRow = slId2.rows[iTmp];
					item[0]=Pop[iTmp];			
					break;
				}
			}			
			if(item[0][3]!=null & item[0][3]!="")
			{
					oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√"+ "</span> " + item[0][3] + " - " + item[0][2] + "</span>";
			}
			else
			{
					oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√"+ "</span> " + item[0][2] + "</span>";
			}
		if(pstr != null && pstr != "")
			{
				var ret;
				var tmpsave="";							
				tmpsave=item[0][2]+","+item[0][3];
				for (i=0;i<g_opn;i++)
				{
						var tmp = pitem[i][2]+","+pitem[i][3];
						ret = tmp.indexOf(tmpsave);
						if(ret != -1)
						{				
								break;
						}
				}
				if(i<g_opn)
						continue;						
				
				  pstr=pstr+'|'+item[0][0]+','+item[0][1]+','+item[0][2]+','+item[0][3];
			}
			else
			{
					pstr=item[0][0]+','+item[0][1]+','+item[0][2]+','+item[0][3];
			}
			pitem[g_opn]=item[0];
		  var newTR=ptb.insertRow();	
	    var newTD=newTR.insertCell();
			if(item[0][3]!=null & item[0][3]!="")
			{			
					newTD.innerHTML = "<span class=style4> <span class=style5> "+eval(g_opn+1)+" </span><a ondblclick=\"play("+ eval(g_opn)+");return(false);\" href=#>"+item[0][3] +" - "+item[0][2]+"</a></span>";
			}
			else
			{
					newTD.innerHTML = "<span class=style4> <span class=style5> "+eval(g_opn+1)+" </span><a ondblclick=\"play("+ eval(g_opn)+");return(false);\" href=#>"+item[0][3] +"</a></span>";
			}
		
			g_opn++;
	}	
	if(pli>=0 && pli<=ptb.rows.length-1)
		ptb.rows[pli].cells[0].className="c";			
	saveUserList(pstr,g_opn);
	iMax=g_opn-iPitemMax;		
	
	if(iMax>0)
	{
		alert("已经添加"+iMax+"首歌曲到播放列表，当前播放列表中共有"+g_opn+"首歌曲");
	}
  else
	{
		alert("播放列表中已经存在当前列表中所有歌曲，当前播放列表中共有"+g_opn+"首歌曲");
	}
}