  function J_ISIE(){
     if(window.navigator.userAgent.indexOf("MSIE")>=1){ 
     return true;//IE
        }else{        
          alert("本系统部分功能未能支持其他浏览器，为了避免给您带来不便，请使用IE内核浏览器！");
        return false;
       }  
   }


function Ok(){
	 
var keycode=window.event.keyCode;
if(keycode==13)
getNamePassWord();
	
}

	 function getNamePassWord()
	{
		if(document.getElementById ("txtUserName").value=="")
			{
				alert("请输入用户名");
				document.getElementById ("txtUserName").focus();
				return false;
			}
				
			if(document.getElementById ("txtPassWord").value=="")
			{
				alert("请输入密码");
				document.getElementById ("txtPassWord").focus();
				return false;
			}
			var username=document.getElementById("txtUserName").value;
			var password=document.getElementById("txtPassWord").value;
			var ip=document.getElementById("lblIp").innerHTML;			
			var nowtime=GetId("hidLoginTime").value;
		try{
			var sta1=Organization.login.Judge(username,password,ip).value;
			
			//cookies中的时间
			var nowtimes=sta1[0];
			//返回的状态
			var sta=sta1[1];
			
			//alert(sta);
			//0代表不是机构的成员
			//1代表输入 的密码不正确
			//2表示登陆成功
			//3表示用户的专户没有审核或冻结
			if(sta==0)
			{
				alert('你输入的用户名不存在！或你不是机构的成员，请重新注册！');	
				document.getElementById ("txtPassWord").value="";
				document.getElementById ("txtUserName").select();
				document.getElementById ("txtUserName").focus();
				return false;			
			}
			else if(sta==1)
			{
				var i=Organization.login.GetErrorCount().value;
				
				if(i==5)
				{	
					var j=Organization.login.IsStatus(username).value;//判断用户的状态
					if (j==1) {
						alert("由于你多次输入错误信息你的账户已被冻结，一天后才可以启动！");
						document.getElementById("btnOk").disabled=true;
						return false;
					}
					
					return false;
				}
				alert("你输入的密码不正确！");
				document.getElementById ("txtPassWord").value="";
				document.getElementById ("txtPassWord").focus();
				return false;	
			}
			else if(sta==2)
			{
				var i=Organization.login.GetErrorCount().value;
				if(i==5){
					var j=Organization.login.IsStatus(username).value;//判断用户的状态
					if (j==1) {
						alert("由于你多次输入错误信息你的账户已被冻结，一天后才可以启动！");
						document.getElementById("btnOk").disabled=true;
						return false;
					}
					else{//登录成功
						//修改登录时间和登录次数
						//alert(nowtimes);
						Organization.login.UpdateCountAndTime(nowtimes,username,ip);
						window.location.href='main.aspx';
						return false;
					}
					return false;
				}
				else{//登录成功
					//修改登录时间和登录次数
					Organization.login.UpdateCountAndTime(nowtimes,username,ip);
					window.location.href='main.aspx';
					return false;
				}
			}
			else if(sta==3){alert("您还没有通过审核和帐号被冻结，请与有关专员联系！");GetId("txtUserName").select();return false;}
			else
			{
				alert("连接服务器中断！");
				}
			}catch(e){Response.Write(e);}
			
			
	}
	function Clear()
	{
		document.getElementById ("txtUserName").value="";
		document.getElementById ("txtPassWord").value="";
		document.getElementById ("txtUserName").focus();
		
	}
	
	
	function IsStatus() {
		var userName=document.getElementById("txtUserName").value;
		var i=Organization.login.IsStatus(userName).value;//判断用户的状态
		if (i==1) {
		alert("你的账户被冻结，一天后才可以启动！");
		document.getElementById("btnOk").disabled=true;
		}
		return false;
	}
	//进入页面用户名文本框获得焦点
	function getFocus() {
		document.getElementById("txtUserName").focus();	
			
	}
