
	var via = parent;
	var write_via = "parent";
	var iLoc= self.location.href;

	function playSel(){via.wmpStop();via.startExobud();}
	function refreshPl(){ self.location=iLoc;}
	function chkSel(){via.chkAllSel();refreshPl();}
	function chkDesel(){via.chkAllDesel();refreshPl();}

	function dspList(n){
		
		var elmABlock= 10;// 设定每页可显示多少个播放项目
		var totElm = via.intMmCnt;
		var totBlock= Math.floor((via.intMmCnt -1) / elmABlock)+1;
		var cblock;
		if(n==null){cblock=1;}
		else{cblock=n;}
		var seed;
		var limit;
		if(cblock < totBlock){seed= elmABlock * (cblock-1); limit =  cblock*elmABlock -1}
		else{seed=elmABlock * (cblock-1); limit= totElm-1;}

	if(via.intMmCnt >0 ){
		var list_num=0;
		mmList.innerHTML='<p>';
		for (var i=seed; i <= limit; i++)
		{	list_num = i + 1;
			if(via.objMmInfo[i].selMm=="t"){elm='<table align=center width=98% cellspacing="0" cellpadding="2" bgcolor="#FFFFFF"><tr id=ttr  ><td width="50" align=left><input type=checkbox  style="cursor:hand;" onfocus=blur() onClick='+ write_via + '.chkItemSel('+ i +'); checked>&nbsp;' + list_num + '.</td><td height=25><div class="ttitle">' ;}
			else{elm = '<table align=center width=98% cellspacing="0" cellpadding="2" bgcolor="#FFFFFF"><tr id=ttr  ><td width="50" align=left><input type=checkbox style="cursor:hand;" onfocus=blur() onClick='+ write_via + '.chkItemSel('+ i +');>&nbsp;' + list_num + '.</td><td  height=25><div class="ttitle">' ;}
			elm = elm + '<a href=javascript:' + write_via + '.selPlPlay(' + i + ');'
			elm = elm + ' onfocus=blur() onclick=\"this.blur();\">'
			if(via.objMmInfo[i].mmTit =="nAnT"){ elm = elm + "未指定媒体标题(等待自动取得媒体信息)";}
			else{elm = elm + via.objMmInfo[i].mmTit;}
			elm= elm+  '</td><td width=20 align=center><a href=javascript:' + write_via + '.selPlPlay(' + i + ') onfocus=blur() onclick=\"this.blur();\" style="cursor:hand;"><img src="/templets/play/1_boot_1.gif" alt="播放"  border=0></a></td><td align=center width=20><a href='+via.objMmInfo[i].geci+' target="geci"><img src="/templets/play/1_boot_3.gif" alt="歌词"  border=0 style="cursor:hand"></a></td><td width=20 align=center><a href='+via.objMmInfo[i].xiazai+' target="geci"><img src="/templets/play/down.gif" alt="下载"  border=0  style="cursor:hand"></a></td></tr><tr><td colspan=7 height=1 bgcolor=#ededed></td></tr>';
			mmList.innerHTML=mmList.innerHTML+elm;
		}

                var pmin=new Number(cblock)-3;
		var pmax=new Number(cblock)+3;
		var ppre=new Number(cblock)-1;
		var pnext=new Number(cblock)+1;
		if(pmin<=3){pmin=1;pmax=7;}
		if(pmax>totBlock){pmax=totBlock;}
		if(ppre<=1){ppre=1;}
		if(pnext>totBlock){pnext=totBlock;}

		for(var j=pmin; j<=pmax; j++){
			page='<a href=javascript:dspList('+j+') onFocus=blur()>['+j+']</a> ';
		}

		pageInfo.innerHTML='<tr><td colspan=7 height=25 width=98% align="center" bgcolor="#FBFFF5"  valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=javascript:dspList(1) onfocus=blur() title=首页><<</a>&nbsp;<a href=javascript:dspList('+ppre+') onfocus=blur() title=上一页><</a>&nbsp;第<font color=#3399FF><b>'+cblock+ '</b></font>页&nbsp;共'+ totBlock+'页&nbsp;共'+totElm+'首&nbsp;<a href=javascript:dspList('+pnext+') onfocus=blur() title=下一页>></a>&nbsp;<a href=javascript:dspList('+totBlock+') onfocus=blur() title=尾页>>></a></td></tr></table>';

	}

	 }



// List Popping Up
function openPlaylist_i(layername)
{
	if (parent.opener)
	{
		if (parent.document.getElementById(layername).style.visibility == 'visible')
			{
				parent.document.getElementById(layername).style.visibility = 'hidden';
				parent.resizeTo(255,138);
			}
		else
			{
				parent.document.getElementById(layername).style.visibility = 'visible';
				parent.resizeTo(255,388);
			}
	}
	else
	{
		if (parent.document.getElementById(layername).style.visibility == 'visible') 
			parent.document.getElementById(layername).style.visibility = 'hidden';
		else
			parent.document.getElementById(layername).style.visibility = 'visible';
	}
}
