function check(){
	if (mgr.username.value =="" || mgr.username.value =="用户名" )
	{	
		alert("用户名为空!");		
		mgr.username.focus();
		return false;
	}
	
	
		if (mgr.password.value =="")
	{	
		alert("用户密码为空!");		
		mgr.password.focus();
		return false;
	}
	
		 if(mgr.password.value.length<4||mgr.password.value.length>16)

  {
    alert("用户密码不能为空且为4到10位的数字，英文字母。)！");
    document.password.focus();
    return false;
  }
 if(mgr.username.value.length<4||mgr.username.value.length>16)

  {
    alert("用户密码不能为空且为4到10位的数字，英文字母。)！");
    document.username.focus();
    return false;
  }
	
	var Letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_" 
	for (i=0; i < mgr.username.value.length; i++) 
	{ 
	var CheckChar = mgr.username.value.charAt(i); 
	CheckChar = CheckChar.toUpperCase(); 
	if (Letters.indexOf(CheckChar) == -1) 
	{ 
	alert ("用户名仅允许输入英文、数字或下划线！"); 
	return false; 
	} 
    }

	return  true; 
}

function openwin()
{ 
	window.open("getpwd.asp","","toolbar=0,menubar=0,scrollbars=no,resizable=no,width=500,height=300;"); //写成一行
} 
