  function ignoreSpaces(string) {
    var temp = "";
    string = '' + string;
    splitstring = string.split(" ");
    for(i = 0; i < splitstring.length; i++)
       temp += splitstring[i];
    return temp;
 }
//检查录入的数据是否包括数字以外的数据
  function check(input) {
      var ok = true;
      var checkOK = "0123456789";
      for (var i = 0; i < input.length; i++) {
        var chr = input.charAt(i);
        var found = false;
        for (var j = 0; j < checkOK.length; j++) {
          if (chr == checkOK.charAt(j)){
            found = true;
          }
        }
        if (input.charAt(0)=="0") ok = false;
        if (!found) ok = false;
     }
     return ok;
 }
 function checkForm(form){
     if(form.bookname.value==""||form.bookname.value==null){
        alert("请输入图书名称!");
        return false;
     }    
     
   return true;
  }

function TurnPage(form){
	if(form.CurrentPage.value==""){
	  alert("请输入页数！");
	  return false;
	 }else  if (!check(form.CurrentPage.value)){
          alert("页数只能是正整数！");
          return false;       
	 }      
	  
   return true;
  }
 
function checkuser(Theform)
          {
            
                  if (Theform.inAccount.value=="")
                  {
                          alert("错误！请输入用户名！");
                          Theform.inAccount.focus();
                          return false;
                  }
				  if (Theform.inPwd.value=="")
                  {
                          alert("错误！请输入密码！");
                          Theform.inPwd.focus();
                          return false;
                  }
				  if (Theform.verform.value=="")
                  {
                          alert("错误！请输入附加码！");
                          Theform.verform.focus();
                          return false;
                  }
				  if (Theform.verform.value!=Theform.verform1.value)
                  {
                          alert("错误！附加码输入不正确！");
                          Theform.verform.focus();
                          return false;
                  }
				  return true;
	}

function checksearch(Theform)
          {
            
                  if (Theform.searchName.value=="")
                  {
                          alert("错误！请输入您所要查找的内容！");
                          Theform.searchName.focus();
                          return false;
                  }				 
				  return true;
	}

function checkscore(Theform)
          {
            
                  if (Theform.stu_card.value=="")
                  {
                          alert("错误！请输入所要查找学生的准考证号错误！");
                          Theform.stu_card.focus();
                          return false;
                  }	
				   if (Theform.verform.value=="")
                  {
                          alert("错误！请输入验证码！");
                          Theform.verform.focus();
                          return false;
                  }
				  if (Theform.verform.value!=Theform.verform1.value)
                  {
                          alert("错误！验证码输入不正确！");
                          Theform.verform.focus();
                          return false;
                  }
				  return true;
	}

function vote_check(thevote){
   if (thevote.vote.value=="")
                  {
                          alert("请选择您的看法！");
                          thevote.vote.focus();
                          return false;
                  }				 
				  return true; 
}
///////////////////////////////////////////////////////////
function on_forgetpwd()
{
      if (document.Login.inAccount.value=="")
                  {
                          alert("错误！请输入用户名！");
                          document.Login.inAccount.focus();
                          return false;
                  }
				  if (document.Login.inPwd.value=="")
                  {
                          alert("错误！请输入密码！");
                          document.Login.inPwd.focus();
                          return false;
                  }
				  if (document.Login.verform.value=="")
                  {
                          alert("错误！请输入附加码！");
                          document.Login.verform.focus();
                          return false;
                  }
				  if (document.Login.verform.value!=document.Login.verform1.value)
                  {
                          alert("错误！附加码输入不正确！");
                          document.Login.verform.focus();
                          return false;
                  }
	 if (document.Login.Typ(0).checked ==true)
     {
        document.Login.action="system/dealwithcenter.jsp?action=login";
        document.Login.submit();
     }
     else
     {
        document.Login.action="user/index.jsp?login=true";
        document.Login.submit();
     }
      return false;
 }

function openAdv(){
   window.open("publishnews/resultvote.jsp","body","toobar=no,left=150,top=100,width=500,height=250,menubar=no,systemMenu=no,resizeable=no");
}
