function killErrors(){return true;}
window.onerror = killErrors;

var ShowMoreLinks = "" ;
var MoreLinksShowHandles = null ;
function showMoreLinks(elm,classname) {
	clearTimeout(MoreLinksShowHandles) ;
	document.getElementById(elm).style.display = "block" ;
	if (classname) {
		document.getElementById(elm+'Handle').className = classname ;
	}
	if (elm != ShowMoreLinks && ShowMoreLinks != "") {
		document.getElementById(ShowMoreLinks).style.display = "none" ;
		if (classname) {
			document.getElementById(elm+'Handle').className = classname ;
		}
	}
	ShowMoreLinks = elm ;
	
}
function hideMoreLinks(elm,classname) {
	MoreLinksShowHandles = setTimeout( function(){document.getElementById(elm).style.display = "none" ;if (classname){document.getElementById(elm+'Handle').className = classname;}}, 500) ;
}
function trim(s)
{
	return  s.replace(/(^\s*)|(\s*$)/g,  "");
} 

function checkdomain(theform)
{  
	if (trim(theform.dns.value)=='')
	{  
		alert("请输入要查询的域名");
		theform.dns.focus();
		theform.dns.value='';
		return false
	}
	var temp=""; 
	for(var i=0;i<theform.ext.length;i++) 
	{ 
	if(theform.ext[i].checked) 
	temp+=theform.ext[i].value+","; 
	}
	if(temp==""){
		alert('请选择要查询的后缀');
		return false
	}
	$("#dns_msg").html("<img src='../skins/2010/images/loading.gif' align='absmiddle' hspace='10'>资料查询中，请稍后…")
	var param;
	param="Domain.Asp?";
	param += "domain=" + escape(trim(theform.dns.value));
	param += "&root=" + escape(temp);
	$.ajax({
	type: "get",
	cache:false,
	url: param,
	timeout: 999999999,
	error: function(){$("#dns_msg").html("资料查询失败");},
	success: function(t0){$("#dns_msg").html(t0);}
	});
	return false
}

function checkbook(theform)
{  
	if (trim(theform.title.value)=='')
	{   alert('标题不能为空');
		theform.title.focus();
		theform.title.value='';
		return false
	}
	var temp=""; 
	for(var i=0;i<theform.stype.length;i++) 
	{ 
	if(theform.stype[i].checked) 
	temp+=theform.stype[i].value; 
	}
	if(temp=="")
	{
		alert("请选择类别");
		return false
	}
	if (trim(theform.content.value)=='')
	{   alert('内容不能为空');
		theform.content.focus();
		theform.content.value='';
		return false
	}
	var param;
	param="../Inc/book.asp?action=save";
	param+="&title="+escape(trim(theform.title.value));
	param+="&stype="+escape(temp);
	param+="&content="+escape(trim(theform.content.value));
	$('#showmsg')[0].style.display='block';
	$('#showmsg').html("数据处理中");
	$.ajax({
	type:"post",
	cache:false,
	url:param,
	timeout:20000,
	error:function(){$('#showmsg').html(Ajax_msg);},
	success:function(t0)
	{
		$('#showmsg').html(t0.substring(1));
		if(t0.substring(0,1)==1){theform.title.value='';theform.content.value='';setTimeout("$('#showmsg')[0].style.display='none';","3000");}
		}
	});
	return false
}

function loadlist()
{
	var param;
	param="../Inc/book.asp";
	$.ajax({
	type: "post",
	cache:false,
	url:param,
	timeout: 20000,
	error:function(){$("#showbook").html(Ajax_msg)},
	success:function(t0){$("#showbook").html(t0);}
	})
}

function chanagepage(t0)
{
	var param;
	param="../Inc/book.asp?page=" + escape(t0);
	$.ajax({
	type: "post",
	cache:false,
	url:param,
	timeout: 20000,
	error:function(){$("#showbook").html(Ajax_msg)},
	success:function(t0){$("#showbook").html(t0);}
	})
}
