<%@ page contentType="text/html; charset=GBK"%>
<%@ page import = "zr.zrpower.common.util.SysPreperty"%>
<%@ page import = "zr.zrpower.entity.sys.SessionUser" %>
<%@ page import = "zr.zrpower.ejb.sys.UIService" %>

<html>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");

UIService userUI =new UIService();
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title><%=SysPreperty.getProperty().SystemName%><%=SysPreperty.getProperty().Versoin%></title>
<style type="text/css">
*
{
	margin:0px;
	padding:0px;
	list-style:none;
	text-decoration:none;
}

body
{
	background:url(zrsysmanage/images/<%=user.getUserImage()%>/lockbg.jpg) repeat-x center top;
	background-color:#01358b;
	text-align:center;
}

</style>

</head>
<link REL="stylesheet" type="text/css" href="zrsysmanage/css/Blue.css">
<script type='text/javascript' src='dwr/engine.js'></script>
<script type='text/javascript' src='dwr/interface/ManageBean.js'></script>
<script type='text/javascript' src='dwr/util.js'></script>
<script language="JavaScript" type="text/JavaScript">
<!--
function login()
{
	if (document.frmMain.password.value.length<1){
	    alert("请填写用户密码!");
            document.frmMain.password.focus();
            return false;
	}else{

          ManageBean.getCheckPw(document.frmMain.loginid.value,document.frmMain.password.value,
          function(items){
              if(items=="1"){
               window.close();
              }else{

               alert("密码错误，请重新输入!");
	           document.getElementById("password").value=""
              }

          }
          );

        }

	message.style.display="none";
	sending.style.display="";
}

//作用：关闭 onkeydown="if(event.keyCode==13)event.keyCode=0;return false;"
function WinClose(){
 if (confirm("确定要退出当前登录，重新进入系统吗?")){
      window.returnValue = "1" ;
      window.close();
	  }
}
 function doSetCapture(){
  document.body.setCapture(false);
  setTimeout("doSetCapture()",10)
  }

//-->
function doButton(){
 if(event.keyCode==13) {
  //btSubmit指对应的提交按扭的id名称
   //document.all.img11.click();
   return false;
 }
}

function KeyDown(){
 if(event.keyCode==13) {
  //在页面form中，按回车不触发事件
  return false;
 }
}

</script>
<%
String strMessage = "";
strMessage = request.getParameter("MessageType");
if (strMessage==null)
{strMessage ="请输入密码登录！";}
if (strMessage.equals("1"))
{strMessage ="密码错误，请重新录入！";}
%>
<body  topmargin="0" leftmargin="0" scroll="no"  onload="doSetCapture();">
<form action="checklogin.do" method="post" name="frmMain" id="frmMain" onSubmit="return login()" onKeyDown="return KeyDown()">

<center>

<table border="0" width="850" cellspacing="0" cellpadding="0" height="461"  background="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/lockback.jpg">
	<tr>
        <td width="360"></td>
	<td>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <br>
        <input name="loginid" type="hidden" id="loginid" size="13" value="<%=user.getUserID()%>">
        密码：<input  type="password" name="password" id="password" size="13"  onKeyDown="doButton()"  style="background-color:transparent;color: #000099; border-style: solid; border-width: 1px; padding: 1px; width:155; height:22"/>


        &nbsp;<img id="img11"  onclick="login();" border="0" src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/lockbtn1.jpg" align="absmiddle"  onMouseOver="this.src='<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/lockbtn2.jpg';" onMouseOut="this.src='<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/lockbtn1.jpg';">
        &nbsp;<img  onclick="WinClose();"   border="0" src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/lockbtn3.jpg" align="absmiddle"  onMouseOver="this.src='<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/lockbtn4.jpg';" onMouseOut="this.src='<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/lockbtn3.jpg';">





                     <br><br><br>

                            <div id="sending" style="display:none;" align="center">
                               <font style="COLOR: #ff8000;FONT-FAMILY: 宋体;FONT-SIZE: 9pt;FONT-WEIGHT: normal">正在验证登录用户身份，请等待...</font>
                            </div>

                            <div id="message" style="display:;" align="center">

                               <font style="COLOR: #ff8000;FONT-FAMILY: 宋体;FONT-SIZE: 11pt;FONT-WEIGHT: normal">系统提示：
                                <font style="COLOR: #ff8000;FONT-FAMILY: 宋体;FONT-SIZE: 11pt;FONT-WEIGHT: normal">您的系统已经锁定，重新进入系统请输入密码。</font>
                            </div>

        </td>
        <td width="60"></td>
	</tr>
</table>

</center>

 </form>
</body>
</html>
