<!--
//全角转半角

function ToDBC(str)
{ 
	var result="";
	for (var i = 0; i < str.length; i++)
	{
		if (str.charCodeAt(i)==12288)
		{
			result+= String.fromCharCode(str.charCodeAt(i)-12256);
			continue;
		}
		if (str.charCodeAt(i)>65280 && str.charCodeAt(i)<65375)
		result+= String.fromCharCode(str.charCodeAt(i)-65248);
		else result+= String.fromCharCode(str.charCodeAt(i));
	} 
	return result;
}

//半角转全角

function ToSBC(str)
{ 
	var result="";
	for (var i = 0; i < str.length; i++)
	{
		if (str.charCodeAt(i)==32)
		{
			result+= String.fromCharCode(str.charCodeAt(i));
			continue;
		}
		if (str.charCodeAt(i)<127)
		result+= String.fromCharCode(str.charCodeAt(i)+65248);
		else result+= String.fromCharCode(str.charCodeAt(i));
	} 
	return result;
}

function notnulltext()
{
		
		var JudgeChar=document.getElementById('keyword').value.replace(/(^\s*)|(\s*$)/g, "");
		JudgeChar=ToSBC(JudgeChar);  //把半角转成全角
		if(JudgeChar=="")
		{
			window.location.href="http://www.tieba.jqw.com";
		}
		else
		{			
			window.location.href="http://www.tieba.jqw.com/NoteSearch-"+encodeURIComponent(JudgeChar)+"-p1.html";
		}
	
}

function notnulltextnote()
{
	var JudgeChar=document.getElementById('keyword').value.replace(/(^\s*)|(\s*$)/g, "");
	JudgeChar=ToSBC(JudgeChar);  //把半角转成全角
	
	if(JudgeChar=="")
	{
		//window.location.href="http://www.tieba.jqw.com";
		window.alert("请输入搜索内容！");
		document.getElementById('keyword').focus();
	}
	else
	{
		if(document.getElementById('st1').checked)
		{
			window.location.href="NoteSearch-"+encodeURIComponent(JudgeChar)+"-p1.html";
		}
		else
		{
			window.location.href="NotesSearch-"+encodeURIComponent(JudgeChar)+"-p1.html";
		}
	}
	
}

function $(s){   
	return document.getElementById(s);
}
-->
