function $(id) { 
	return document.getElementById(id); 
}
//去掉字符串末尾的空格
function jtrim(str)
{     
     while (str.charAt(0)==" ")
          {str=str.substr(1);}      
     while (str.charAt(str.length-1)==" ")
         {str=str.substr(0,str.length-1);}
     return(str);
}
//判断输入是否为空
function isEmpty(str) 
{
    if ((jtrim(str)==null)||((jtrim(str)).length==0)) 
    {
	return false;
    }
    else 
	return true;
}
function search_order()
{
	var search = $("search");
	var newsForm = document.forms["NewsForm"];
	$("searchbut").disabled = true;
	if (!isEmpty(search.value)) {
		search.focus();
		$("searchbut").disabled = false;
		return ;
	} else {
		newsForm.action = "/NewsManage.do?method=SesrchQseeNews";
		newsForm.elements["listSQL"].value="";
		newsForm.elements["actionType"].value="none";
		newsForm.submit();
	}
}
