function havenoChar(theelement)
{
   text="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
   for(i=0;i<=theelement.length-1;i++)
   {      char1=theelement.charAt(i);     
          index=text.indexOf(char1);     
          if(index==-1)     
          {        return true; 
           }
   } 
   return false;
}
function havenoLetter(theelement)
{  
    text="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";  
    index=text.indexOf(theelement);
      if(index==-1)    
     {   return true;    
     }   
    return false;
}
function CheckLast(theelement)
  {
     text="_-.";    
     index=text.indexOf(theelement);
      if(index!=-1)  
    {     
      return true; 
    }  
   return false;
}

function percheck()
{
	 re=/^[\u0391-\uFFE5]{2,4}$/g;
	 ss=new String(document.form1.f_01.value);
	 if(!ss.match(re))
	 {
	     alert("姓名为2-4个汉字，不含空格！");
	     document.form1.f_01.focus();
	     return false;
	 }
	 re=/^\d{2}/g;
	 ss=new String(document.form1.f_03.value);
	 if(!ss.match(re))
	 {
	     alert("年龄为一个整数！");
	     document.form1.f_03.focus();
	     return false;
	 }
	 re=/^([0-9]{4})(-)([0-9]{1,2})(-)([0-9]{1,2})$/g;
	 ss=new String(document.form1.f_05.value);
	 if(!ss.match(re))
	 {
	     alert("日期格式为：1999-01-01");
	     document.form1.f_05.focus();
	     return false;
	 }
	 
	 if(document.form1.f_06.value.length>50|document.form1.f_06.value.length<1)
	 {
	     alert("毕业学校长度小于50个字，且不为空!");
	      return false;
	 }
	 
	 if(document.form1.f_07.value.length>50|document.form1.f_07.value.length<1)
	 {
	     alert("联系方式长度小于50个字，且不为空!");
	      return false;
	 }
	 if(document.form1.f_08.value.length>50)
	 {
	     alert("电子邮箱长度小于50个字!");
	      return false;
	 }
	 if(document.form1.f_11.value.match(/^ *$/g))
	 {
	     alert("职位不能为空!");
	      return false;
	 }
	 if(document.form1.f_12.value.length>50)
	 {
	     alert("职位说明长度小于50个字!");
	      return false;
	 }
	 if(document.form1.f_14.value.length>50)
	 {
	     alert("职位说明长度小于50个字!");
	      return false;
	 }

}

function checkid()
{
	re=/^[0-9a-zA-Z]+$/g;
	ss=new String(document.form1.userid.value);
	if(document.form1.userid.value.length==0)
	{
		alert('用户名长度为6-16位！');
		document.form1.userid.focus();
	}
	else if(!ss.match(re))
	{
		alert('帐号只能用英文(a-z,A-Z)、数字(0-9)!');
	}
	else
	{ 
		window.open('searchid.asp?id='+ss,'','width=300,height=100,vscroll=yes');
	}
}

function checkpwd()
{
	re=/^[0-9a-zA-Z]{6,16}$/g;
	ss=new String(document.form1.f_01.value);
	if(!ss.match(re))
	{
		alert('密码为6-16位字母或数字！');
		document.form1.f_01.focus();
		return false;
	}
	if(document.form1.f_01.value!=document.form1.f_02.value)
	{
	    alert("两次密码输入不一致!");
		document.form1.f_01.focus();
	    return false;
	}


}