<%@ 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 width="188" border="0" cellpadding="0" cellspacing="0" class="tabtopk">
              <tr>
                <td height="24" align="right" valign="middle" class="font8"><%=myLanguagesDeal.GetMyString("MemberTrueName")%></td>
                <td align="left" valign="middle"><input type="text" class="wenbenkuang" size="12" maxLength="18" name="SubscibeName" onkeypress="return SubscibeCheckInput()" /></td>
                
              </tr>
              <tr>
                <td  height="24" align="right" valign="middle" class="font8"><%=myLanguagesDeal.GetMyString("MemberEmail")%></td>
                <td  height="24" align="left" valign="middle"><input maxLength="30" name="SubscibeEmail" onkeypress="return SubscibeCheckInput()" type="text" class="wenbenkuang" size="12" /></td>
              </tr>
				<tr>
					<td  colspan="2" align="center" valign="middle">
						<table width="55" border="0" cellspacing="0" cellpadding="0">
						  <tr>
							<td height="20" align="center" background="Images/TP40/bt4.gif" class="font4"><div onclick="return Subscibecheck();" align="absmiddle"  style="cursor:pointer"><%=myLanguagesDeal.GetMyString("ButtonSubscibe")%></div></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>