<%@ Control Language="c#" AutoEventWireup="True" Codebehind="UserLogon.ascx.cs" Inherits="DreamerShop.UserControl.UserLogon" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<%@ Register TagPrefix="uc1" TagName="LanguagesDeal" Src="../LanguagesManage.ascx" %>
<uc1:LanguagesDeal id="myLanguagesDeal" runat="server" Visible="False"></uc1:LanguagesDeal>
<FORM style="MARGIN: 0px" name="formlogon" method="post" action="Index.aspx">
	<asp:panel id="PanLogin1" runat="server">
		<TABLE cellSpacing="0" cellPadding="0" align="center" border="0">
			<TR>
				<TD class="white"><%=myLanguagesDeal.GetMyString("LoginTextAccount")%><!--用户名：--><INPUT class="top" onkeypress="return LogonCheckInput()"  onkeyup="return AtNameTextInput()" type="text" maxLength="20"
						size="9" name="LoginName"><%=myLanguagesDeal.GetMyString("LoginTextPassword")%><!--密&nbsp;&nbsp;码：--><INPUT class="top" onkeypress="return LogonCheckInput()" type="password" maxLength="20" onkeyup="return AtPassTextInput()"
						size="7" name="LoginPass"><%=myLanguagesDeal.GetMyString("LoginTextVerifyCode")%><!--验证码：--><INPUT class="top" type="text" maxLength="20" size="4" name="VerifyCode" onkeyup="return AtCodeTextInput()"></TD><TD>
					<asp:Image id="Image1" runat="server" ImageUrl="../GetVerifyCode.aspx" ImageAlign="Bottom"
						BorderWidth="0px" ></asp:Image></TD><TD>
					<asp:Label id="lbLoginMessage" runat="server" ForeColor="Red"></asp:Label><INPUT type="hidden" value="logon" name="logonSure">&nbsp;<INPUT class="go-wenbenkuang" onclick="return logoncheck();" type="button" value='<%=myLanguagesDeal.GetMyString("LoginButtonLogin")%>' name="btlogonSure">
					<INPUT class="go-wenbenkuang" onclick="return logongetpass();" type="button" value='<%=myLanguagesDeal.GetMyString("LoginLinkForgotPassword")%>' name="btlogonSure">&nbsp;<A href="UserReg.aspx" ><span class="white"><%=myLanguagesDeal.GetMyString("LoginButtonRegister")%></span></A>
				</TD>
			</TR>
		</TABLE>
	</asp:panel>
	<asp:panel id="PanLogin2" runat="server">
		<TABLE cellSpacing="1" cellPadding="3" align="center" border="0">
			<TR >
				<TD><A href="UserCenter.aspx"><span class="white"><%=myLanguagesDeal.GetMyString("MemberCenter")%></span><!--用户中心--></A>
				</TD>
				<TD><INPUT type="hidden" value="logout" name="logonout"> <INPUT class="go-wenbenkuang" type="submit" value="退出登录" name="btlogonOut">
				</TD>
			</TR>
		</TABLE>
	</asp:panel>
	<asp:panel id="PanLogin3" runat="server">
		<TABLE cellSpacing="0" cellPadding="0" align="center" border="0">
			<TR >
				<TD align="right" class="white"><%=myLanguagesDeal.GetMyString("LoginTextAccount")%><!--用户名：--><INPUT class="top" onkeypress="return LogonCheckInput()" type="text" maxLength="20"
						size="10" name="FGUserName">
				<%=myLanguagesDeal.GetMyString("LoginTextVerifyCode")%><!--验证码：--><INPUT class="top" type="text" maxLength="20" size="6" name="FGVerifyCode">
				</TD>
				<TD>
					<asp:Image id="Image2" runat="server" ImageUrl="../GetVerifyCode.aspx" ImageAlign="Bottom"
						BorderWidth="0px"></asp:Image></TD>
		
				<TD >
					&nbsp;<asp:Label id="lbFGMessage" runat="server" ForeColor="Red"></asp:Label><INPUT type="hidden" value="logon" name="logonSure"><INPUT type="hidden" value="getpass" name="logonGetPass">
					<INPUT class="go-wenbenkuang" onclick="return logonpasscheck();" type="button" value='<%=myLanguagesDeal.GetMyString("LoginButtonForgotPassword")%>' name="btlogonGetPass">
				</TD>
			</TR>
		</TABLE>
	</asp:panel>
</FORM>
<SCRIPT language="javascript">
	<!--
	function LogonCheckInput(){
		if (event.keyCode == 37 || event.keyCode == 39  || event.keyCode == 60  || event.keyCode == 62 )
			event.returnValue = false;
	}
		function checkspace(checkstr) {
			var str = '';
			for(i = 0; i < checkstr.length; i++) {
				str = str + ' ';
			}
			return (str == checkstr);
		}
	function logoncheck()
	{
		if(checkspace(document.formlogon.LoginName.value)) {
			document.formlogon.LoginName.focus();
			alert('<%=myLanguagesDeal.GetMyString("LoginAccountRequest")%>');
			return false;
		}
		
		if(checkspace(document.formlogon.LoginPass.value)) {
			document.formlogon.LoginPass.focus();
			alert('<%=myLanguagesDeal.GetMyString("LoginPasswordRequest")%>');
			return false;
		}
		if(checkspace(document.formlogon.VerifyCode.value)) {
			document.formlogon.VerifyCode.focus();
			alert('<%=myLanguagesDeal.GetMyString("LoginTextCodeRequest")%>');
			return false;
		}
		document.formlogon.logonSure.value="logon";
		document.formlogon.submit();
	}
	function logonpasscheck()
	{
		if(checkspace(document.formlogon.FGUserName.value)) {
			document.formlogon.FGUserName.focus();
			alert('<%=myLanguagesDeal.GetMyString("LoginAccountRequest")%>');
			return false;
		}
		
		
		document.formlogon.logonSure.value="getpass";
		document.formlogon.submit();
	}
	
	function logongetpass()
	{
		
		document.formlogon.logonSure.value="getpass";
		document.formlogon.submit();
	}
	
	function AtNameTextInput(){
		if(event.keyCode==13 )
			document.formlogon.LoginPass.focus();
	}
	function AtPassTextInput(){
		if(event.keyCode==13 )
			document.formlogon.VerifyCode.focus();
	}
	function AtCodeTextInput(){
		if(event.keyCode==13 )
			logoncheck();
	}
	//-->
</SCRIPT>
