function checkemail()
{
  if(document.subform.fmEmail.value.length!=0)
  {  
	  var email = document.subform.fmEmail.value;
      var pattern = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
      chkFlag = pattern.test(email);
	  if(chkFlag!=true)
      {
        alert("Email地址不正确！");
        document.subform.fmEmail.focus();
        return false;
      }

   }
 else
  {
   alert("Email不能为空！");
   document.subform.fmEmail.focus();
   return false;
   }
   
 document.subform.submit();
 
}

function searchAtc()
{
  if (document.fmSch.fmKeyword.value.length==0)
  {
    document.fmSch.fmKeyword.focus();
    alert("请先输入关键字！");
	return false;
  }
  document.fmSch.submit();
}

function CommentNow()
{
   if(document.addform.fmComment.value.length==0)
   {
	  alert("评论不能为空！");
      document.addform.fmComment.focus();
      return false; 
   }
   
    document.addform.submit();
   
}

function inputclick()
{
	if (document.headform.fmKeyword.value=="请输入您要查询的关健字")
	{
		document.headform.fmKeyword.value="";
	}
}

function changeOpt(aaname)
{
  var optObjaa,optObjbb,bbname;
  if (aaname=="optArticle")
  {
	  bbname="optDoc";
	  document.headform.action="article_list.asp";
  }
  else
  {
	  bbname="optArticle";
	  document.headform.action="doc_list.asp";
  }
  
  optObjaa=document.getElementById(aaname);
  optObjbb=document.getElementById(bbname);
  if (optObjaa.className=="transfer_balloon")
  {
	   optObjaa.className="register_balloon here";
	   optObjbb.className="transfer_balloon";
  }

}

function searchall()
{
  if (document.headform.fmKeyword.value.length==0)
  {
    document.headform.fmKeyword.focus();
    alert("请先输入关键字！");
	return false;
  }
  //alert(document.headform.fmKeyword.value);
  document.headform.submit();
}


