/* 类别跳转 */
function display(ID)
{
	if (document.getElementById(ID).style.display == "none") {
		document.getElementById(ID).style.display = "";
	}else{
		document.getElementById(ID).style.display = "none";
	}
}
         function openn(){
          var args = openn.arguments;
          if(args[0] == 0) return;
          location.href=(args[0]);
          }
function cTrim(sInputString,iType)
		{
		var sTmpStr = ' '
		var i = -1
		if(iType == 0 || iType == 1)
		{
		while(sTmpStr == ' ')
		{
		++i
		sTmpStr = sInputString.substr(i,1)
		}
		sInputString = sInputString.substring(i)
		}
		if(iType == 0 || iType == 2)
		{
		sTmpStr = ' '
		i = sInputString.length
		while(sTmpStr == ' ')
		{
		--i
		sTmpStr = sInputString.substr(i,1)
		}
		sInputString = sInputString.substring(0,i+1)
		}
		return sInputString
		}

		function check_form()
		{
	
		var InfoName = cTrim(document.getElementById('InfoName').value,0);
		var ClassID=cTrim(document.getElementById('ClassID').value,0);
		var Descriptions=cTrim(document.getElementById('Descriptions').value,0);
		
		if(InfoName==""){
		alert("请输入内容标题!");
		document.getElementById('InfoName').focus();
		return false;
		}
		else if(ClassID==""){
		alert("请选择栏目类别!");
		document.getElementById('InfoName').focus();
		return false;
		}
		else if(Descriptions==""){
		alert("请输入简要提示!");
		document.getElementById('Descriptions').focus();
		return false;
		}
		else
		{
		return true;
		}
		}