//屏蔽可忽略的js脚本错误
function killErr(){
	return true;
}
window.onerror=killErr;


function selectsearcha(theA,word,keyword){
	obj=document.getElementById("topsearch").getElementsByTagName("a");
	 for(var i=0;i< obj.length;i++ ){
		obj[i].className='';
	}
	theA.className='choose1';
	if (document.getElementById("topsearchkeyword").value=='')
	{
		document.getElementById("topsearchkeyword").value='请输入您要查找的'+keyword+'内容';
	}

	if (word=='news')
	{
		document.getElementById("topsearchform").action="news/search.php?action=search";
	}
	else if (word=='fenlie')
	{
		document.getElementById("topsearchform").action="f/search.php?action=search";
	}
	else if (word=='hr')
	{
		document.getElementById("topsearchform").action="hr/search.php?action=search";
	}
	else if (word=='tg')
	{
		document.getElementById("topsearchform").action="tg/search.php?action=search";
	}
	else if (word=='hr')
	{
		document.getElementById("topsearchform").action="http://bbs.tc167.com/search.php?mod=forum&searchid=7&orderby=lastpost&ascdesc=desc&searchsubmit=yes&kw=";
	}
}

function checkpost(){
	if (document.getElementById("topsearchkeyword").value=='')
	{
		alert('关键字不能为空!');
		return false;
	}
}
