<%@ Control Language="c#" AutoEventWireup="True" Codebehind="Subscibe.ascx.cs" Inherits="DreamerShop.TP1.Subscibe" 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 name="Subscibeform" method="post" style="MARGIN: 0px" action="index.aspx">
	<TABLE cellSpacing="1" cellPadding="2" width="95%" align="center"  border="0">
		<TR >
			<TD width="100%">
				<TABLE cellSpacing="1" cellPadding="2" width="100%" align="center" border="0">
					<TR>
						<TD class="font9" align="right" ><%=myLanguagesDeal.GetMyString("MemberTrueName")%></TD><td><INPUT class="wenbenkuang" type="text" maxLength="18" name="SubscibeName" onkeypress="return SubscibeCheckInput()"  size="15">						</TD>
					</TR>
					<TR>
						<TD align="right" class="font9" ><%=myLanguagesDeal.GetMyString("MemberEmail")%></TD><td><input class="wenbenkuang" type="text" maxLength="30" name="SubscibeEmail" onkeypress="return SubscibeCheckInput()" size="15">						</TD>
					</TR>
					<TR>
						<TD colspan="2" align="center"><img src="Images/TP22/bt1.gif" width="61" height="19"  onclick="return Subscibecheck();" align="absmiddle"  style="cursor:pointer"/></TD>
					</TR>
				</TABLE>
			</TD>
		</TR>
	</TABLE>
</FORM>
<SCRIPT language="javascript">
	<!--
	function SubscibeCheckInput(){
		if (event.keyCode == 37 || event.keyCode == 39  || event.keyCode == 60  || event.keyCode == 62 )
			event.returnValue = false;
	}
	function Subscibecheckspace(checkstr) {
		var str = '';
		for(i = 0; i < checkstr.length; i++) {
			str = str + ' ';
		}
		return (str == checkstr);
	}
	function Subscibecheck()
	{
		if(Subscibecheckspace(document.Subscibeform.SubscibeName.value)) {
			alert('<%=myLanguagesDeal.GetMyString("ReViewInputNameAlert")%>');
			document.Subscibeform.SubscibeName.focus();
			return false;
		}
		
		if(Subscibecheckspace(document.Subscibeform.SubscibeEmail.value)) {
			alert('<%=myLanguagesDeal.GetMyString("MemberInputEmailMsg")%>');
			document.Subscibeform.SubscibeEmail.focus();
			return false;
		}
		
		var emailReg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
		if(!emailReg.test(document.Subscibeform.SubscibeEmail.value)) {
			alert('<%=myLanguagesDeal.GetMyString("MsgInputRightEmail")%>');
			document.Subscibeform.SubscibeEmail.focus();
			return false;
		}
		alert('<%=myLanguagesDeal.GetMyString("TextThanks")%>');
		document.Subscibeform.submit();
		
	}


	//-->
</SCRIPT>