<%@ page language="C#" autoeventwireup="true" inherits="WebAdmin_ShopLeveladd, LebiMall" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>添加店铺等级</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="js/checked.js"></script>
    <link href="css/tipswindown.css" type="text/css" rel="stylesheet" />
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/tipswindown.js" type="text/javascript"></script>
    <script src="js/topHead.js" type="text/javascript"></script>
      <script type="text/javascript">
        function validate(){
            var flag=true;
            if(document.getElementById("txt_name").value==""){
                document.getElementById("msg_n").innerHTML="<span class='msg_submit'>类型名称不能为空！</span>";
                flag=false;
            }else{
                document.getElementById("msg_n").innerHTML="";
            }
            if(document.getElementById("txt_tmax").value==""){
                document.getElementById("msg_tm").innerHTML="<span class='msg_submit'>产品推荐上限不能为空！</span>";
                flag=false;
            }else{
                 document.getElementById("msg_tm").innerHTML="";
            }
            if(document.getElementById("txt_cmax").value==""){
                 document.getElementById("msg_cm").innerHTML="<span class='msg_submit'>产品添加上限不能为空！</span>";
                 flag=false;
            }else{
                document.getElementById("msg_cm").innerHTML="";
            }
            return flag;
        }
        
        function resizeEditor2(id,size){
                 var newheight = parseInt(document.getElementById(id).style.height, 10)+size;   
	             if(newheight >= 60) {   
		        document.getElementById(id).style.height = newheight + 'px';   
	        }  
	        }
    </script>
</head>
<body>
    <form id="form1" runat="server" onsubmit="return validate()">
       <script>header(1,1,"images/");</script>
   
    <!--面包屑-->
    <div class="blank clearfix"></div>
    
    <!--功能区-->
   <div class="tabmenus mainwidth">
            <ul>
                <li><a href="ShopLevellist.aspx"><span>店铺类型设置</span></a></li>
                <li class="current"><a href="ShopLeveladd.aspx"><span>店铺类型添加</span></a></li>
            </ul>
        </div>
    <div class="tab-mainbody">
        <div class="tab-mainbody2">
        <div class="functionHandleArea clearfix">
            <div style="float: left;">
                <input id="Button2" type="button"  runat="server" class="btn-app" onserverclick="Button1_ServerClick" />
                <input type="image" name="Submit" title=" 重填 " onClick="reset();return false;" src="images/bt_res.gif" align="absmiddle" />
                <input type="image" border="0" title=" 返回 " onclick="history.back();return false;" src="images/bt_bak.gif" align="absmiddle" />
            </div>
            <div style="float: right;">
                &nbsp;
            </div>
        </div>
        <div id="datalist">
            <table cellpadding="0" cellspacing="0" width="100%" border="0" id="list">
                <tr>
                    <td colspan="2" class="list-head">
                    </td>
                </tr>
                <tr>
                    <th>添加店铺等级</th><th><span class="title_r" id="msg_sub"></span></th>
                     <script type="text/javascript">
                      var $=jQuery;
                        var i = 2;
                        var f="<%=Session["returnValue"] %>";
                        if(f=="true"){
                            tipsWindown('操作结果','text:操作成功！','250','60','true','2000','true','text');
                            <% Session["returnValue"]= null; %>
                            setInterval("fun()", 1000);
                        }
                        if(f=="false"){
                            tipsWindown('操作结果','text:操作失败！','250','60','true','2000','true','text');
                                <% Session["returnValue"]= null; %>
                        }
                        function fun() {
                            if (i == 1) {
                                window.location.href="ShopLevelList.aspx";
                            }
                            i--;
                        }
                    </script>
                </tr>
                <tr >
                    <td width="15%" >
                        类型名称：
                    </td>
                    <td >
                        <input type="text" runat="server" id="txt_name" class="input" />&nbsp;<span id="msg_n"></span>
                    </td>
                </tr>
                <tr >
                    <td >
                        产品添加上限：
                    </td>
                    <td >
                        <input type="text" runat="server" id="txt_cmax" class="input" onkeyup="value=value.replace(/[^\d]/g,'')"
                            onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />
                            &nbsp;<span id="msg_cm"></span>
                    </td>
                </tr>
                <tr >
                    <td >
                        产品推荐上限：
                    </td>
                    <td >
                        <input type="text" runat="server" id="txt_tmax" class="input" onkeyup="value=value.replace(/[^\d]/g,'')"
                            onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />
                            &nbsp;<span id="msg_tm"></span>
                    </td>
                </tr>
                <tr >
                    <td >
                        保障金：
                    </td>
                    <td >
                        <input type="text" runat="server" id="txt_bm" class="input" value="0" />
                    </td>
                </tr>
                <tr >
                    <td >
                        排序：
                    </td>
                    <td >
                        <input type="text" runat="server" id="txt_sort" class="input" value="0" onkeyup="value=value.replace(/[^\d]/g,'')"
                            onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />
                    </td>
                </tr>
                <tr >
                    <td >                              
                        描述：
                    </td>
                    <td >
                        <textarea id="txt_ms" runat="server" style="height:100px; width:400px;" class="input-textarea"></textarea><br />
                         <input type="image" src="images/bt_close.gif" onclick="javascript:resizeEditor2('txt_ms',-50);return false;" />
                            <input type=image src="images/bt_open.gif" onclick="javascript:resizeEditor2('txt_ms',50);return false;" />

                    </td>
                </tr>
                <tr>
                    <td colspan="2" class="list-foot">
                        <input id="Button1" type="button"  runat="server" class="btn-app" onserverclick="Button1_ServerClick" />
                    </td>
                </tr>
            </table>
            <script type="text/javascript">tdshowm("list");</script>
            </div>
        </div></div>
    </form>
</body>
</html>
