function SelectAll()
{
 
   var dom = document.all;
   var el = event.srcElement;
  
      for(i = 0; i < dom.length; i ++ )
      {
         if(dom[i].tagName == "INPUT" && dom[i].type.toLowerCase() == "checkbox")
         {
		 
            dom[i].checked = true;
         }
      }
 
   
}
function SelectFX()
{
   var dom = document.all;
   var el = event.srcElement;
  
      for(i = 0; i < dom.length; i ++ )
      {
         if(dom[i].tagName == "INPUT" && dom[i].type.toLowerCase() == "checkbox")
         {
		 if(dom[i].checked==true)
		 
		 { 
		 dom[i].checked = false;
		 }
		 else{ 
		 dom[i].checked = true;
		 }
           
         }
      }
  
   
}
function isValidCode(strCode)
{
   var i, cChar
   var strValidID = "0123456789-.";
   for (i = 0; i < strCode.length; i ++ )
   {
      cChar = strCode.charAt(i);
      if(strValidID.indexOf(cChar) == - 1) return false;
   }
   return true;
}
function skyterm1(){
	var info,s,ad;
	ad="〖学校教务管理系统提示您！〗\n\n";
	info=ad+"您确实要增加信息吗?";
				s=document.getElementById("TxtTerm1")
				if(s.value=="")
				{
					alert(ad + "学期名称不能为空！");
					s.focus();
					return false;
				}
				s=document.getElementById("TxtShowID1")
				if(s.value==""|| !isValidCode(s.value))
				{
					alert(ad + "学期显示顺序不能为空,并且必须是数字！");
					s.focus();
					return false;
				}
			if(confirm(info)){return true;}else{return false;}
}
function skyterm2(){
	var info,s,ad;
	ad="〖学校教务管理系统提示您！〗\n\n";
	info=ad+"您确实要修改信息吗？";
				s=document.getElementById("TxtTerm2")
				if(s.value=="")
				{
					alert(ad + "学期名称不能为空！");
					s.focus();
					return false;
				}
				s=document.getElementById("TxtShowID2")
				if(s.value==""|| !isValidCode(s.value))
				{
					alert(ad + "学期显示顺序不能为空,并且必须是数字！");
					s.focus();
					return false;
				}
			if(confirm(info)){return true;}else{return false;}
}
