﻿// JScript 文件
function checkUser()
        {
            if(document.getElementById("txtUserName").value=="")
            {
                alert('用户名不能为空');
                return false;
            }
            if(document.getElementById("txtPwd").value=="")
            {
                alert('请输入密码');
                document.getElementById("txtPwd").focus();
                return false;
            }
//            if(document.getElementById("txtValiNum").value=="")
//            {
//                alert('请输入验证码');
//                document.getElementById("txtValiNum").focus();
//                return false;
//            }
            if(document.getElementById("radCompany").checked==false && document.getElementById("radPerson").checked==false)
            {
                alert('请选择登录类型');
                return false;
            }            
            return true;
        }		
        function checkCorpUser()
        {
            if(document.getElementById("txtUname").value=="")
            {
                alert('用户名不能为空');
                return false;
            }
            if(document.getElementById("txtPassword").value=="")
            {
                alert('请输入密码');
                document.getElementById("txtPassword").focus();
                return false;
            }            
            if(document.getElementById("radManager").checked==false && document.getElementById("radEmployy").checked==false)
            {
                alert('请选择登录类型');
                return false;
            }            
            return true;
        }	
            function checkEmail(res)
			{
				var pattern =/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
				if(pattern.test(res))
				{
					return true;
				}else
				{
				    alert('请输入正确的Email地址！');
					return false;
				}
			}
			function   keyDown()   
			{
				if (event.keyCode   ==   13)     
				{   
					document.getElementById("imgCompanyLogin").focus();     
				} 
			}


