$ = function(em){	return document.getElementById(em);	};
$F = function(em){	return document.getElementById(em).value;	};

var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var ver = "";
var VER_IE6 = "IE6";
var VER_IE7 = "IE7";
var VER_FE = "FE";

function MM_findObj(n, d) { //v4.0
  var p,i,x;
  if(!d) d=document;
  if((p=n.indexOf("?"))>0&&parent.frames.length)
   {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
   }
  if(!(x=d[n])&&d.all) x=d.all[n];
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
var s_list =""+web_url+"Inc/Ad.asp?availHeight=";
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

function stopError() {
return true;} 
window.onerror = stopError; 

function doSearch(){
	if($F("key") == "") alert("关键词不允许为空!"); else window.open(""+web_url+"Search.asp?key="+$F("key"),'search');
	return false;
};

function CheckAll(form){
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		e.checked = true;
	}
}
function CheckAllfan(form){
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
			if (e.checked==false)	e.checked = true;
			else			e.checked = false;
	}
}

function MusicPlay(myform){
	var strCBValue = ""+web_url+"PlaySong.asp?id=";	
	var checknum=0;
	var N = myform.elements.length;
	for (var i=0;i<N;i++){
		var e = myform.elements[i];
		if (e.type=="checkbox"){
			if(e.checked){
					strCBValue = strCBValue + "_" + e.value;	
					checknum=checknum+1;				
			}
		}
	}
	if(strCBValue==""+web_url+"PlaySong.asp?id="){
		alert("请选择要播放的歌曲(可多选)");
		return false;
	}else{	
		if(checknum>100){
			alert("系统限制100首歌曲连播，您选择了"+checknum+"首歌曲超出了"+(checknum-100)+"！");
			return false;
		}else{
			window.open(strCBValue+"_",'7xiwl_player');
		}
	}
};

function ranArray(n){
	var a,r,l=n.length,x,d=new Array(l);
	for(x=l-1;x>=0;x--)
	{
		r=Math.floor(Math.random()*(x+1));
		d[x]=n[r];
		n[r]=n[x];
	}
	return d;
}

function SelectRandAll(form){
	var k=[];
	for(var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
		e.checked = false;
		k[i]=i;
	}
	var newform=ranArray(k);
	var l=[];
	for (var i=0;i<newform.length && i<form.elements.length/2;i++){
		l[i]=newform[i];
		var e = form.elements[newform[i]];
		e.checked = true;
	}
	MusicPlay(form)
}

function SelectdAll(form){
	for (var i=0;i<form.elements.length;i++){
		var e = form.elements[i];
//		if (e.name != 'chkall')
			e.checked = true// form.chkall.checked;
	}
}

function goBack(){
	document.getElementById('login_f').style.display='none';
	document.getElementById('pass').value='';
	document.getElementById('userinfo').style.display='block';	
}
function sh(divid,viz){   
  document.getElementById(divid).style.display=viz;
}
function dj235comyc(tag){
	if(VER_IE6 != ver) return;
	node=tag.childNodes[2];
	if(node.style.display == "none" || node.style.display == "")	node.style.display='block';
	else															node.style.display='none';
}
function dj235comtjyc(tag){
	if(VER_IE6 != ver) return;
	node=tag.childNodes[0].childNodes[1];
	if(node.style.display == "none" || node.style.display == "")	node.style.display='block';
	else															node.style.display='none';
}
function dj235flys(tag){
	tag.className="list_k_h";
}
function Undj235flys(tag){
	tag.className="list_k";
}
function testExplorer(){
	var browser=navigator.appName;
	var b_version=navigator.appVersion ;
	var version=b_version.split(";"); 
	var trim_Version=version[1].replace(/[ ]/g,""); 
	
	if(browser=="Microsoft Internet Explorer" && trim_Version == "MSIE7.0") { 
		ver = VER_IE7;
	}else if(browser=="Microsoft Internet Explorer" && trim_Version == "MSIE6.0") {
		ver = VER_IE6;
	} else	ver = VER_FE;
}
function dj235o(tagName,conName,index,totaltag){
	for(i=0;i<totaltag;i++){
		document.getElementById(tagName+i).className="";
		document.getElementById(conName+i).style.display="none";
	}
	document.getElementById(tagName+index).className="hover";
	document.getElementById(conName+index).style.display="block";
}