<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Comments.aspx.vb" Inherits="WebSite.Comments" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="AppTheme/my.rtl.css" rel="stylesheet" type ="text/css" />
    <link href="AppTheme/themes/base/jquery-ui-1.8.16.rtl.css" rel="stylesheet" type ="text/css" />
    <script src="Scripts/jquery-ui-1.8.18.Custom.min.js" type ="text/javascript" ></script>
    <script src="Scripts/jquery.tooltip.min.js" type ="text/javascript" ></script>
    <script src="../Scripts/jquery-1.10.0.min.js" type ="text/javascript"></script>
   







    <style type ="text/css" >
        .Col_1 {
        width :15%;
        text-align :left ;
        }
        .Col_2 {
        text-align :right;
        }
        .Col_3 {
        width :25%;
        }
        .auto-style1 {
            color: #FF3300;
        }
        </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#btnSend").click(function () {
                var vEmailText = $("#fldEmail").val();

                if ($("#fldFullName").val().length == 0) {
                    alert('نام و نام خانوادگی وارد نشده است');
                    return false;
                }
                if (fvalidateEmail(vEmailText) != true) {
                    alert('آدرس ايميل وارد شده معتبر نيست');
                    return false;
                }
                if ($("#fldComment").val().length == 0) {
                    alert('نظر يا پيشنهاد وارد نشده است');
                    return false;
                }
                if ($("#fldAge").val().length == 0 || isnan($("#fldAge").val()) != 0) {
                    $("#fldAge").text='0'
                }
            });
        });
        function fvalidateEmail(sEmail) {
            var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
            if (filter.test(sEmail)) {
                return true;
            }
            else {
                return false;
            }
        }
</script>

</head>
<body>
    <form id="frmMain" runat="server" dir="rtl" style="background: none transparent;">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div id="div" dir="rtl">
            <table style="width: 100%">
                    <tr>
                        <td class="Col_1">نام و نام خانوادگی</td>
                        <td class="Col_2">
                        <asp:TextBox ID="fldFullName" runat="server" Width="250px"></asp:TextBox>
                        <span class="auto-style1">*</span></td>
                    </tr>
                <tr>
                        <td class="Col_1">سن</td>
                        <td class="Col_2">
                        <asp:TextBox ID="fldAge" runat="server" Width="100px"></asp:TextBox>
                        </td>
                    </tr>
                <tr>
                        <td class="Col_1">تحصيلات</td>
                        <td class="Col_2">
                        <asp:DropDownList ID="popSpcLevelId" runat="server"></asp:DropDownList>
                        </td>
                    </tr>
                <tr>
                        <td class="Col_1">شهر</td>
                        <td class="Col_2">
                        <asp:TextBox ID="fldCity" runat="server" Width="250px"></asp:TextBox>
                        </td>
                    </tr>
                <tr>
                        <td class="Col_1">پست الکترونيک</td>
                        <td class="Col_2">
                        <asp:TextBox ID="fldEmail" runat="server" Width="250px"></asp:TextBox>
                        <span class="auto-style1">*</span></td>
                    </tr>
                <tr>
                        <td class="Col_1">نظر</td>
                        <td class="Col_2">
                       <asp:TextBox ID="fldComment" runat="server" Width="600px" Height="100px" Rows="5" TextMode="MultiLine"></asp:TextBox>
                        <span class="auto-style1">*</span></td>
                    </tr>
                <tr>
                        <td class="Col_1">&nbsp;</td>
                        <td class="Col_2">
                            <asp:Button ID="btnSend" runat="server" Text="ارسال" ToolTip="ارسال اطلاعات" Width="120px" />
                            &nbsp;&nbsp;
                        <asp:Button ID="btnClear" runat="server" Text="پاک کردن فرم" ToolTip="پاک کردن اطلاعات فرم" Width="120px" />

                        &nbsp;&nbsp;
                            <asp:Label ID="lblMsg" runat="server" ForeColor="#FF9966"></asp:Label>
                            &nbsp;</td>
                    </tr>
           </table> 
        </div>
    </form>
</body>
</html>

