var tmpstr="<!--歌词加载中...-->";
var lrcobj = new lrcClass(tmpstr.slice(4,-3));
var lrc0, lrc1;
moveflag = false;
movable = false;
var lrctop;
predlt = 0;
curdlt = 0;	
var ptype=0;
var bbt=0;	
function lrcrun()
			{
				if(ptype==1)
					with(RealPlayer1)
				 {
					try
					  {
					lrcobj.run(Math.floor(RealPlayer1.GetPosition()/1000));
					}
					  catch(e){
						  wp.style.display="";
							rp.style.display="none";
							br.innerHTML="您不能播放RM/RAM的歌曲,请先安装<a href=http://player.cn.real.com target=_blank>RealPlayer(8.0以上版本)</a>";
							doTriStateRainbowLink();
							};
				  }
				else
				  with(MediaPlayer1)
				  {
					try
					  {
					lrcobj.run(controls.currentPosition);
					  }
					  catch(e){};
				  }

			  if(arguments.length==0) lrc0 = setTimeout("lrcrun()",10);
			}
function lrcClass(tt)
{
	lrcbox.innerText = "";
    lrcbc.innerText = "";
  this.inr = [];
  this.min = [];

  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,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").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;
  }

  for(var ii=0; ii<this.inr.length-1; ii++)
    this.min[ii] = Math.floor((this.inr[ii+1].t[0]-this.inr[ii].t[0])*10);
  this.min.sort(function(a,b){return a-b});
  min = this.min[0]/2;

  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];
	  if(ptype==1)
		this.dte = (ii<this.inr.length-1)?this.inr[ii+1].t[0]:Math.floor(RealPlayer1.GetLength()/1000);
	  else
		  this.dte = (ii<this.inr.length-1)?this.inr[ii+1].t[0]:MediaPlayer1.currentMedia.duration;;
      lrcwt1.innerText = this.retxt(ii-4);
	  lrcwt2.innerText = this.retxt(ii-3);
	  lrcwt3.innerText = this.retxt(ii-2);    
      lrcwt4.innerText = this.retxt(ii-1);
      lrcwt5.innerText = this.retxt(ii+1);
	  lrcwt6.innerText = this.retxt(ii+2);
      lrcwt7.innerText = this.retxt(ii+3);
      lrcwt8.innerText = this.retxt(ii+4);
      lrcwt9.innerText = this.retxt(ii+5);  
	  lrcwt10.innerText = this.retxt(ii+6);
      lrcwt11.innerText = this.retxt(ii+7); 
      this.print(this.retxt(ii));
     if(this.dlt==ii-1)
      {
        clearTimeout(lrc0);
        if(lrcoll.style.pixelTop!=0) lrcoll.style.top = 0;
        clearTimeout(lrc1);
      }
      else if(parseInt(lrcoll.style.top)!=-20)
      {
        clearTimeout(lrc0);
        lrcoll.style.top = -20;
        clearTimeout(lrc1);
      }
      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歌词显示区");
  lrcwt1.innerText = "";
  lrcwt2.innerText = "";
  lrcwt3.innerText = "";
  lrcwt4.innerText = "";
  lrcwt5.innerText = "";
  lrcwt6.innerText = "";
  lrcwt7.innerText = "";
  lrcwt8.innerText = "";
  lrcwt9.innerText = "";
  lrcwt10.innerText = "";
  lrcwt11.innerText = "";
}
// JavaScript Document
function valid(v){return typeof(v)!='undefined'}
function isNull(v){return typeof(v)=='undefined' || v==null}

// 聚合两个对象(用于使类对象具有派生功能)
Object.prototype.extend = function(object) { 
	for (property in object) { 
		this[property] = object[property]; 
	} 
	return this; 
} 
// 支持数组Array
Object.prototype.clone = function(all){
	var cloneObj = new Object();
	if (valid(all) && all){
		for(prop in this){
			if(typeof(this[prop])=="object") cloneObj[prop] = this[prop].clone(all);
			else cloneObj[prop] = this[prop];
		}
	}else{for(prop in this){cloneObj[prop] = this[prop];}}
	return cloneObj;
}

function validProp(prop){return prop!='extend' && prop!='clone';}
if (!Function.prototype.apply) { 
Function.prototype.apply = function(object, parameters){
  if (!object)   object = window; 
  if (!parameters) parameters = new Array(); 
  var params = new Array(); 
  for (var i = 0; i < parameters.length; i++) params[i] = 'parameters[' + i + ']'; 
  object.__apply__ = this; 
  var result = eval('object.__apply__(' + params.join(', ') + ')'); 
  object.__apply__ = null; 
  return result; 
}} 
Function.prototype.bind = function(object) { 
var __method = this;
return function() { 
  __method.apply(object, arguments); 
} 
} 
function CLASS(base)
{
	if(!valid(base)) base = null;
	var clsObj = function(){
		if (this.base==null){this.create.apply(this, arguments);return;}
		var creators = [clsObj];
		
		while(this.base){creators.push(this.base);this.base = this.base.base;}
		for(var i=creators.length-1; i>=0; i--) this.extend(creators[i].prototype);
		for(var i=creators.length-1; i>=0; i--) creators[i].prototype.create.apply(this, arguments);
	}
	clsObj.prototype.base = base;
	clsObj.prototype.create = function(){}
	// 用于调用虚函数的基类实现
	clsObj.prototype.callof = function(func)
	{
		func = func.replace(/::/g, '.prototype.');
		func = func.replace(/\(/g, '.apply(this,[');
		func = func.replace(/\)/g, '])');
		eval(func);
	}
	// 用于声明一个类，可用于定义成员变量，和函数接口
	clsObj.declare = function(){}
	// 用于实现一个类
	clsObj.implement = function(implementation){
		this.prototype.extend((new this.declare()).extend(implementation));
	}
	return clsObj;
}

function getNodeValue(node)
{
	if(node && node.firstChild)return node.firstChild.nodeValue;
	else return "";
}
function tryExe ()
{ 
  var ret = null; 
  for (var i = 0; i < arguments.length; i++) { 
    var fun = arguments[i]; 
    try { ret = fun(); break; } catch (e) {} 
  } 
  return ret; 
} 
var Ajax = { 
  getHttp: function() { 
    return tryExe( 
      function() {return new XMLHttpRequest()},
      function() {return new ActiveXObject('Microsoft.XMLHTTP')}, 
	  function() {return new ActiveXObject('Msxml2.XMLHTTP')}, 
	  function() {return new ActiveXObject('Msxml3.XMLHTTP')}
      ) || false; 
  },
  emEvents : ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']
} 

Ajax.CRequest = CLASS();
Ajax.CRequest.declare = function()
{
	this.http = null;
	this.domDoc = null;
    this.async = true; 
	this.header = {};
	this.event = {};

	// 对象函数
	this.create = function(){}	// 构造对象
	this.Get = function(){}
	this.Post = function(){}
	this.disconnect = function(){}
	this.onStateChange = function(){}
	this.responseIsSuccess = function(){}
	this.responseIsFailure = function(){}
	this.getData = function(){return this.http.responseBody;}
	this.getText = function(){return this.http.responseText;}
	this.getXML = function(){return this.http.responseXML;}
	this.getXMLData = function(tag){}
}
Ajax.CRequest.implement(
{
	// 构造对象
	create : function(async)
	{
		this.async = async;
		this.http = Ajax.getHttp(); 
	},

	post : function(url)
	{
		
		this.header.Content_type = 'application/x-www-form-urlencoded'; 
		if (this.http.overrideMimeType) this.header.Connection = 'close';
		this.domDoc = null;
		try {
			var i=url.indexOf('?');
			param = i<0?'':url.substring(i+1, url.length);
			this.http.open('post', url, this.async); 
			
			var reg = /_/g;
			for (prop in this.header){
				if (validProp(prop)) this.http.setRequestHeader(prop.replace(reg, '-'), this.header[prop]);
			}
			if (this.async) { 
				this.http.onreadystatechange = this.onStateChange.bind(this); 
				setTimeout(function(){this.onStateChange(1)}.bind(this), 10); 
			}
			this.http.send(param);
			
		} catch (e){} 
	},

	get : function(url)
	{
		this.domDoc = null;
		try {
			this.http.open('get', url, this.async); 
			for (prop in this.header){
				if (validProp(prop))  this.http.setRequestHeader(prop, this.header[prop]);
			}
			if (this.async) { 
				this.http.onreadystatechange = this.onStateChange.bind(this); 
				setTimeout(function(){this.onStateChange(1)}.bind(this), 10); 
			}
			this.http.send();

		} catch (e){} 
	},

	disconnect : function()
	{
		if (this.http) this.http.abort();
	},
	
	onStateChange: function(readyState)
	{
		if (typeof(state)=='undefined'){
			readyState = this.http.readyState; 
			if (readyState == 1) return; 
		}
		var eventPrc = this.event['on' + Ajax.emEvents[readyState]];
		if (valid(eventPrc)) eventPrc(this);
		if (readyState == 4) this.http.onreadystatechange = function(){}; 
	}, 
	getXMLData : function(tag)
	{
		if (this.domDoc==null) this.domDoc = this.getXML();
		if (this.domDoc==null) return'';
		var root = this.domDoc.documentElement;
		if (root==null) return '';
		return getNodeValue(root.selectSingleNode(tag));
	}
});

	function getAsyncReq(url, callback)
	{
		var request = null;
		if (request==null){
			request = new Ajax.CRequest(true);
		}
		request.completeFlag = false;
		request.tag = 0;
		request.event.onComplete = function(){request.completeFlag=true;setTimeout(callback,2);};
		setTimeout(function(){/*var times=request.times;*/setTimeout(function(){if (!request.completeFlag/* && times==request.times*/) {request.tag=1;request.disconnect();}},10000);},0);
		request.get(url);
		return request;
	}
	function getLrc(md,ld,s,g,callback)
	{
		var url ="dj_lrc.asp?md=" + md + "&ld="+ ld + "&s=" + s+ "+"+ g;
		return this.getAsyncReq(url, callback);
	}
	function getGC(pflag,rowi)
	{
		lrcbox.innerHTML="<br><br><br><br><span style='font-size:12px;margin-left:12px;height:20; color:#00FF00'>&nbsp;&nbsp;&nbsp;歌词加载中...</span>";
		var md,ld,s,g;
		var mRow = mtb.rows[0];
		var lrcid;
		clearTimeout(lrc0);
		if(svalue != "")
		{
			md = tmpw[0];
			ld = tmpw[1];
			s =  tmpw[2];
			g =  tmpw[3];
		}
		else
		{
			md = pitem[rowi][0];
			ld = pitem[rowi][1];
			s =  pitem[rowi][2];
			g =  pitem[rowi][3];
		}
		//mRow.cells[6].innerHTML="<a href=dj_mg.asp?url=dj_mp.htm?w="+md+","+ld +","+s+","+g +" class=gray2 target=_blank>给好友点歌</a>";
		if(ld== "" || ld ==null)
		{
			mRow.cells[4].innerHTML="下载LRC歌词";
		}
		else
		{
			mRow.cells[4].innerHTML="<a href=dj_lrcword.asp?ty=1&w=" +ld +" class=gray2 target=_blank>下载LRC歌词</a>";
		}
		surl = "";
		var ret = md.indexOf(".");
		if(ret != -1)
		{
			surl = md;
			md = "";
		}
		lrcollbox.releaseCapture();
		var req = getLrc(md,ld,s,g,function(){
		if(req != null)
			{	
			if (req.tag==1)
			{
				document.getElementById("lrcbox").innerHTML="<br><br><br><br><span style='font-size:12px;margin-left:16px;height:20; color:#00FF00'>&nbsp;&nbsp;&nbsp;网络繁忙，请重试</span>";
				req.tag=0;
				req.disconnect();
				req = null;
				MediaPlayer1.url = "";
				lrctmp="";
				lrc0 = setTimeout("lrcrun()",10);
				lrcobj = new lrcClass(lrctmp.slice(4,-3));
				lrcrun();
				return;
			}
			if(surl == null || surl == "")
			{
				surl = req.getXMLData('//surl');
			}
			if(surl != null && surl != "")
			{
				lrcid = req.getXMLData('//lrcid');
				if(lrcid== "" || lrcid ==null)
				{
					mRow.cells[4].innerHTML="下载LRC歌词";
				}
				else
				{
					mRow.cells[4].innerHTML="<a href=dj_lrcword.asp?ty=1&w=" +lrcid +" class=gray2 target=_blank>下载LRC歌词</a>";				
				}
				lrctmp = req.getXMLData('//lrc');
				req.disconnect();
				req.tag=0;
				var turl=surl.toUpperCase();
				if(turl.indexOf(".RM")!=-1 || turl.indexOf(".RAM") != -1)
				{
					
					if(!isr || or_r)
					{		
						clearTimeout(timer);
						bw.style.display="none";
						br.style.display="";
					
						if(svalue == "")
						{
							if(!(pli==g_opn-1 && g_opn>0))
								{
								br.innerHTML="您不能播放RM/RAM的歌曲,请先安装<a href=http://player.cn.real.com target=_blank>RealPlayer(8.0以上版本)</a>";
							doTriStateRainbowLink();
								}
							else
								{
								if (bIE) br.style.color="#00FF00";
								if (bNS) document.getElementById('br').style.color ="#00FF00";
							 br.innerHTML="如果您无法试听，请先安装<a href=http://player.cn.real.com target=_blank>RealPlayer(8.0以上版本)</a> 软件 <a href=http://www.zhongsou.com/mzsm.htm target=_blank>免责声明</a>";
								}

							req = null;
							setTimeout(function(){if(singlef==1){next();}return;},5000);	
						}
						else
						{
							br.innerHTML="您不能播放RM/RAM的歌曲,请先安装<a href=http://player.cn.real.com target=_blank>RealPlayer(8.0以上版本)</a>";
							doTriStateRainbowLink();
						}
					}
					else
					{
						try{
					ptype=1;
					MediaPlayer1.controls.stop();
					MediaPlayer1.url ="";
					wp.style.display="none";
					rp.style.display="";
					bw.style.display="none";
					br.style.display="";					
					RealPlayer1.SetSource(surl);
					RealPlayer1.SetPosition(0);
					RealPlayer1.DoPlay();
						}
						catch(e){
							wp.style.display="";
							rp.style.display="none";
							br.innerHTML="您不能播放RM/RAM的歌曲,请先安装<a href=http://player.cn.real.com target=_blank>RealPlayer(8.0以上版本)</a>";
							doTriStateRainbowLink();
						};
					}											
				}
				else
				{
					ptype=0;
					if(isr)
					{
						try{
					RealPlayer1.SetSource("");
					RealPlayer1.DoStop();
						}
						catch(e){
							wp.style.display="";
							rp.style.display="none";
						br.innerHTML="您不能播放RM/RAM的歌曲,请先安装<a href=http://player.cn.real.com target=_blank>RealPlayer(8.0以上版本)</a>";
							doTriStateRainbowLink();
							};
					}				
					br.style.display="none";
					bw.style.display="";
					rp.style.display="none";
					wp.style.display="";					
					
					MediaPlayer1.url = surl;
					MediaPlayer1.CurrentPosition = 0;
				}
					lrcobj="";
					if(lrctmp == null || lrctmp == "")
					{
						  clearLrc();
						  document.getElementById("lrcbox").innerHTML="未找到匹配的歌词...";
					}
					else
					{ 
						movable=false;
						moveflag=false;
						predlt = 0;
						curdlt = 0;
						bbt = 0;
						if(lrctmp.indexOf("未找到匹配的歌词")!=-1)
						{
							clearLrc();
							document.getElementById("lrcbox").innerHTML="未找到匹配的歌词...";
						}
						else
						{
						lrcobj = new lrcClass(lrctmp.slice(4,-3));
						lrcrun();
						}	
					}			
				//mRow.cells[2].innerHTML="<a href=" + surl +" class=gray2 target=_blank>下载当前歌曲</a>";
                                mRow.cells[2].innerHTML="<a href=dj_lrcword.asp?ty=2&w=" +md +" class=gray2 target=_blank>下载当前歌曲</a>";
			}
			else
				{
					MediaPlayer1.url ="";
					RealPlayer1.SetSource("");
					lrctmp="";
					lrctmp="<!--[00:01.00]未找到匹配的歌词...-->";
					lrcobj = new lrcClass(lrctmp.slice(4,-3));
					lrcrun();
					mRow.cells[2].innerHTML="下载当前歌曲";
					if(singlef==1)
					next();	
					
				}
				req = null;
			}
			}
		);		
	}
function additem(item,slType)
{
	if(slType == 1)
	{
		var newTR = $('TR','',slId1.rows[item],'beforeBegin');
		var newTD = $('TD','',newTR);
	}
	else if(slType == 2)
	{
		var newTR = $('TR','',slId2.rows[item],'beforeBegin');
		var newTD = $('TD','',newTR);
	} 
	else 
	{
		var newTR = $('TR','',slId0.rows[item],'beforeBegin');
		var newTD = $('TD','',newTR);
	} 
}
function getSonglist(slType,callback)
{
	var url = st[slType];
	return this.getAsyncReq(url, callback);
}
function getSong(slType)
{
	var req = getSonglist(slType,function(){
		if(req != null)
		{
			if (req.tag==1)
			{
				document.getElementById("df"+eval(slType)).innerHTML = "网络繁忙，请稍候再试......";
				req.tag=0;
				req.disconnect();
				req = null;
				return;
			}				
			var xmldoc = req.getXML();
			var root = xmldoc.documentElement.selectSingleNode('//mp3');
			var infos = root.selectNodes('//item');
			document.getElementById("df" + eval(slType)).innerHTML = "";
			if(slType == 0)
			{
				sl1 = 1;
			}
			else if(slType == 1)
			{
				sl2 = 1;
			}
			else if(slType == 2)
			{
				sl3 = 1;
			}
			for(var i = 0; i < infos.length;)
			{
				var tmp = [];
				var oRow;
				var tmpsinger = "";
				var typestr="";
				var snum="";
				if(i<9)
				{
					snum = "0" + eval(i + 1);
				}
				else
				{
					snum = eval(i + 1);
				}
				tmp[0] = getNodeValue(infos[i].selectSingleNode('md'));
				tmp[1] = getNodeValue(infos[i].selectSingleNode('lrcid'));
				tmp[2] = getNodeValue(infos[i].selectSingleNode('song'));
				tmp[3] = getNodeValue(infos[i].selectSingleNode('singer'));

				additem(i,slType);
				typestr = tmp[2] + "," + tmp[3];
				if(tmp[3] == "" || tmp[3] == null)
				{
					tmpsinger = "";
				}
				else
				{
					tmpsinger = tmp[3] + " - ";
				}
				var typeret = -1;
				if(pstr != "" && pstr != null)
				{
					typeret = pstr.indexOf(typestr);
				}
				if(typeret == -1)
				{
					if(slType == 1)
					{
						oRow = slId1.rows[i];
						oRow.cells[0].innerHTML = "<a href=\"#\" ondblclick=\"addlist(2," + eval(i) + ");return false;\"><span class=\"style4\"> <span class=\"style5\">" + snum + "</span> " + tmpsinger + tmp[2] + "</span>";
						NSong[i] = tmp;
					}
					else if(slType == 2)
					{
						oRow = slId2.rows[i];
						oRow.cells[0].innerHTML = "<a href=\"#\" ondblclick=\"addlist(3," + eval(i) + ");return false;\"><span class=\"style4\"> <span class=\"style5\">" + snum + "</span> " + tmpsinger + tmp[2] + "</span>";
						Pop[i] = tmp;
					}
					else
					{
						oRow = slId0.rows[i];
						oRow.cells[0].innerHTML = "<a href=\"#\" ondblclick=\"addlist(1," + eval(i) + ");return false;\"><span class=\"style4\"> <span class=\"style5\">" + snum + "</span> " + tmpsinger + tmp[2] + "</span>";
						Rank[i] = tmp;
					}
				}
				else
				{
					if(slType == 1)
					{
						oRow = slId1.rows[i];
						oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + tmpsinger + tmp[2] + "</span>";
						NSong[i] = tmp;
					}
					else if(slType == 2)
					{
						oRow = slId2.rows[i];
						oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + tmpsinger + tmp[2] + "</span>";
						Pop[i] = tmp;
					}
					else
					{
						oRow = slId0.rows[i];
						oRow.cells[0].innerHTML = "<span class=\"style4\"> <span class=\"style5\">" + "√" + "</span> " + tmpsinger + tmp[2] + "</span>";
						Rank[i] = tmp;
					}

				}
				i++;
			}
			req.tag=0;
			req.disconnect();
			req = null;
			if(glflg == 0 && (g_opn>0 || svalue!=""))
			{	
				if(svalue=="")
					pli=0;
				getGC('p',pli);
				glflg = 1;
			}
			return;
		}
	}
  );
}

function getST(callback)
{
	var url = "dj_list.xml";
	return this.getAsyncReq(url, callback);
}
function getSTitle()
{
	var req = getST(function(){
		if(req != null)
		{
			if (req.tag==1)
			{
				req.tag=0;
				req.disconnect();
				req = null;
				return;
			}
			var sxmldoc = req.getXML();
			var sroot = sxmldoc.documentElement.selectSingleNode('//mp3');
			var sinfos = sroot.selectNodes('//item');
			var ot = menu.rows[0].cells.item("m");
			for(var i = 0; i < sinfos.length;)
			{
				tititem[i] = getNodeValue(sinfos[i].selectSingleNode('stitle'));
				ot[i].innerHTML = tititem[i];
				st[i] = getNodeValue(sinfos[i].selectSingleNode('surl'));
				i++;
			}
			req.tag=0;
			req.disconnect();
			req = null;
			getSong(0);
			sl1 = 1;
			return;
		}
	}
  );
}
