var sPop = null;
var postSubmited = false;
document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText { font-family: Tahoma, Verdana; background-color: #91DAF8; border: 1px #000000 solid; font-size: 14px; font-weight:bold;padding-right: 4px; padding-left: 4px; line-height: 18px; padding-top: 2px; padding-bottom: 2px; visibility: hidden; filter: Alpha(Opacity=66)}");

document.write("</style>");
document.write("<div id='popLayer' style='position:absolute;z-index:1000' class='cPopText'></div>");

function showPopupText(event) {
	if(event.srcElement) o = event.srcElement; else o = event.target;
	MouseX=event.clientX;
	MouseY=event.clientY;
	if(o.alt!=null && o.alt!="") { o.pop=o.alt;o.alt="" }
	if(o.title!=null && o.title!=""){ o.pop=o.title;o.title="" }
	if(o.pop!=sPop) {
sPop=o.pop;
if(sPop==null || sPop=="") {
document.getElementById("popLayer").style.visibility="hidden";        
} else {
if(o.dyclass!=null) popStyle=o.dyclass; else popStyle="cPopText";
document.getElementById("popLayer").style.visibility="visible";
showIt();
}
	}
}

function showIt() {
	document.getElementById("popLayer").className=popStyle;
	document.getElementById("popLayer").innerHTML=sPop.replace(/<(.*)>/g,"&lt;$1&gt;").replace(/\n/g,"<br>");;
	popWidth=document.getElementById("popLayer").clientWidth;
	popHeight=document.getElementById("popLayer").clientHeight;
	if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24; else popLeftAdjust=0;
	if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24; else popTopAdjust=0;
	document.getElementById("popLayer").style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
	document.getElementById("popLayer").style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
}


if(!document.onmouseover) {
	document.onmouseover = function(e) {
if (!e) showPopupText(window.event); else showPopupText(e);
	};
}


function djmusics(musicid)
{//if(confirm("如果选择播放此单曲，会中断当前播放里的歌曲，您确实要替换吗？"))
//{
window.open("/ting/"+musicid+".html",'c');
//}
}
function allcheOrcl(myform,cheOrclear)
	{
var ische = cheOrclear;
for (var i=0;i<myform.elements.length;i++)  //用来历遍form中所有控件,
{
var e = myform.elements[i];
if (e.Type="checkbox")//当是checkbox时才执行下面
{
if(ische==1)
{
if(!e.checked)//当是checkbox未被选取时才执行下面
{
e.checked=true;
}
}
else if(ische==8)
{	
e.checked=false;
}
else
{
if(!e.checked)//当是checkbox未被选取时才执行下面
{
e.checked=true;
}
else
{
e.checked=false;
}
	
}
}
}
	}
function checkall(myform)
	{

var strCBValue = "";
for (var i=0;i<myform.elements.length;i++)  //用来历遍form中所有控件,
{
var e = myform.elements[i];
if (e.Type="checkbox")//当是checkbox时才执行下面
{
if(e.checked)//当是checkbox被选取时才执行下面
{
strCBValue = strCBValue + e.value+"_";
}
 
}
}

if(strCBValue=="")
{
alert("请选择要播放的歌曲(可多选)");
return;
}
else
{	
//location.href = "play_list.asp?id="+strCBValue
//var testaa=blank+"\"c\"";
//alert(testaa);
window.open("http://www.xkmp3.com/music?"+strCBValue,'c8');
//window.open(strCBValue+".html","cococ");

}
	}
function djcheckall(myform)
	{

var strCBValue = "";
for (var i=0;i<myform.elements.length;i++)  //用来历遍form中所有控件,
{
var e = myform.elements[i];
if (e.Type="checkbox")//当是checkbox时才执行下面
{
if(e.checked)//当是checkbox被选取时才执行下面
{
strCBValue = strCBValue + e.value+"_";
}
 
}
}

if(strCBValue=="")
{
alert("请选择要播放的歌曲(可多选)");
return;
}
else
{	
//location.href = "play_list.asp?id="+strCBValue
//var testaa=blank+"\"c\"";
//alert(testaa);
window.open("http://www.djbu.com/playlist.html?"+strCBValue,'c');
//window.open(strCBValue+".html","cococ");

}
	}
function Pcheckall(myform)
{
	
var strCBValue = "";
for (var i=0;i<myform.elements.length;i++)  //用来历遍form中所有控件,
{
var e = myform.elements[i];
if (e.Type="checkbox")//当是checkbox时才执行下面
{
if(e.checked)//当是checkbox被选取时才执行下面
{
strCBValue = strCBValue + e.value+"_";
}
 
}
}

if(strCBValue=="")
{
alert("请选择要播放的歌曲(可多选)");
return;
}
else
{
window.open("http://tao.xkmp3.com/playlist.html?"+strCBValue,'c');
}
	
}
function chernd(myform)
{
for (var i=0;i<myform.elements.length;i++)  //用来历遍form中所有控件,
{
var e = myform.elements[i];

if (e.Type="checkbox")//当是checkbox时才执行下面
{
e.checked=false;
var random_number = Math.round(Math.random()*100)
if((random_number%2)!=0)//当是checkbox未被选取时才执行下面
{
e.checked=true;
}
	
}
}

}

function listbox_checkAll(obj)
{
	 var objSelect = eval("document.all."+obj);

	 for (var i=0; i<objSelect.options.length; i++)
	 {
objSelect.options[i].selected = 1;
	 }
	  
}
function listbox_checkBack(obj)
{
	 var objSelect = eval("document.all."+obj);

	 for (var i=0; i<objSelect.options.length; i++)
	 {
if(objSelect.options[i].selected)
{
objSelect.options[i].selected = 0;
}
else
{
objSelect.options[i].selected = 1;
}
	 }
	  
}
function listbox_checkRnd(obj)
{
	 var objSelect = eval("document.all."+obj);

	 for (var i=0; i<objSelect.options.length; i++)
	 {
objSelect.options[i].selected = 0;
var random_number = Math.round(Math.random()*10)
if((random_number%2)!=0)//当是checkbox未被选取时才执行下面
{
objSelect.options[i].selected = 1;
}
	 }	
}

function listbox_checkPlay(obj)
{
	 var objSelect = eval("document.all."+obj);
	var strCBValue = "";	
	 for (var i=0; i<objSelect.options.length; i++)
	 {
if(objSelect.options[i].selected)//当是checkbox被选取时才执行下面
{
strCBValue = strCBValue +objSelect.options[i].value+"_";
}
	 }
	 if(strCBValue=="")
	{
alert("请选择要播放的歌曲\n提示：(ctrl+点击 可多选)");
return;
	}
	 window.open("http://tao.xkmp3.com/playlist.html?"+strCBValue,'c');
}
function listbox_dcPlay(obj)
{
	 var objSelect = eval("document.all."+obj);

myurl=objSelect.options[objSelect.selectedIndex].value;
 window.open("http://tao.xkmp3.com/ting/"+myurl+"/",'c');
}
function listbox_onclik(obj)
{
	 
}
function changABC(obj)
{
	var obj1=document.getElementById('abc'); //装载首字母的文本框
	var objs=obj;//obj.substr(obj.length-1);  //获取地址栏最后一个字母	
	if (objs!='0') 
	{
obj1.value+=objs; 
	}
	else
	{
 obj1.value=obj1.value.substr(0,obj1.value.length-1);
	}	
	obj1.form.p.value=1;
	obj1.form.submit();	
	return false;
}
function changepage(obj,act)
{
	switch (act)
	{
	case 0:
if(obj.p.value>1) 
{
obj.p.value--;
obj.submit()

}
break;
	case 1:
obj.abc.value="";
var showinfo =  document.getElementById("showinfoABC");
showinfo.src="zmjs.html";
break;
	case 2:
obj.p.value++;
obj.submit();
break;
	}
	return false;
}

//300_300 的替换函数

//判断显示字符
function getStr(tmpstr){  
var returnStr=tmpstr.substring(0,8); 
if (tmpstr.length > 9)   {          
returnStr = returnStr + ""; 
	return returnStr
	}  
return tmpstr; 
}
function getSingerName(tmpstr){  
var returnStr=tmpstr.substring(0,5); 
if (tmpstr.length > 6)   {          
returnStr = returnStr + ""; 
	return returnStr
	}  
return tmpstr; 
}
function ow(obj) {
	return wo(obj.href,"305","410",1,1); 
}
 function wo(url,w,h,m,s)
 {
	        var left=(screen.width-w)/2;
	        var top=m?(screen.height-h)/2:0;
	        window.open(url,'cnw','width='+w+',height='+h+',top='+top+',left='+left+',scrollbars=0,resizable=0,status='+s);
	        return false;
 }
 
getCookie=function(name){var oRegex=new RegExp(name+'=([^;]+)','i');var oMatch=oRegex.exec(document.cookie);if(oMatch&&oMatch.length>1)return unescape(oMatch[1]);else return '';};
setCookie=function(_id,_name){var current_str=_id+"#"+_name+"*xkmp3*";var cookie_info=getCookie("xkmp3History");var deal_cookie="";if(""!=cookie_info){cookie_info=cookie_info.split("*xkmp3*");var N=(cookie_info.length>17)?17:cookie_info.length-1;for(var i=0;i<N;i++){if(current_str!=cookie_info[i]+"*xkmp3*"&&''!=cookie_info[i])deal_cookie+=(cookie_info[i]+"*xkmp3*");}}current_str=(''==deal_cookie)?current_str:current_str+deal_cookie;set_cookie("xkmp3History", current_str, 168);set_cookie("open_player", "open", null);};historyShow=function(){var cookie_info=getCookie("xkmp3History").split("*xkmp3*");var N=cookie_info.length-1;var history_list="";for(var i=0;i<N;i++){var info=cookie_info[i].split("#");var s=(i==0)?" class='f'":"";document.writeln("<li"+s+" onMouseOver=\"cBg(this,'over');\" onMouseOut=\"cBg(this,'out');\">"+(i+1)+".<input type='checkbox' value='"+info[1]+"'><a href='../"+info[1]+"/' target='_self'>"+info[0]+"</a></li>");}};delCookie=function(){var exp=new Date();var strCookie="";exp.setTime(exp.getTime()+3600000000);document.cookie="xkmp3History="+strCookie+";path=/; expires="+exp.toGMTString();alert("清除成功，请按F5刷新网页！");};cBg=function(t,act){if(t.className!="f"&&act=="over")t.className="over";else if(t.className!="f"&&act=="out")t.className="out";};function set_cookie(_name, _value, _hours){var expdate = new Date();if( null != _hours ) expdate.setTime(expdate.getTime() + _hours * 3600000);document.cookie = _name + "=" + escape (_value) + "; path=/;domain=.www.xkmp3.com;" +((_hours == null) ? ";" : ("; expires="+ expdate.toGMTString()));};






//document.write('<SCRIPT src="http://st1.xkmp3.com/hi.htm"></SCRIPT>');
//document.writeln("<script language='javascript' src='http://tao.xkmp3.com/js/16.js'></script>");