<%--
//-----------------------------------------------------------
// 文件名称: Product_Product_Operate.aspx
// 类 名 称: Product_Product_Operate.aspx.cs
// 描    述: 商品添加
// 修改标识: Modify By 钟治宇 2008-12-05
// 修改内容: 商品价格长度超过9位报错
// 修改标识: Add By 钟治宇 2008-12-05  修改了几个正则表达式
//-----------------------------------------------------------
--%>
<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Product_Product_Operate, V5Shop.Shop.Category" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="ajax" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc1" %>
<!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" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar-system.css" rel="stylesheet" type="text/css" />
    
    <link href="css/plugins.css" rel="stylesheet" type="text/css" />
    <link href="css/product.css" rel="stylesheet" type="text/css" />
    <script src="js/mootools.js" type="text/javascript"></script>
    <script src="js/message.js" type="text/javascript"></script>
    <script src="js/uploader.js" type="text/javascript"></script>
    <script src="js/product.js" type="text/javascript"></script>
    
    <script language="javascript" src="js/Common.js" type="text/javascript"></script>
    <script language="javascript" src="js/Control_Calendar.js" type="text/javascript"></script>
    <script type="text/javascript" src="editor/fckeditor.js"></script>

    <script type="text/javascript">
    function checkisnumber(strvalue)
    {
        if(isNaN(strvalue))
        {
            alert("只能为数字");
            return false;
        }
    }
    function SetTag(obj,s)
    {
        var val=$("txtTags").value;
        if(val.indexOf(s)==-1)
        {
            val+=s+",";
            obj.style.color="#CCCCCC";
        }
        else
        {
            val=val.replace(s+",","");
            obj.style.color="#3F6293";   
        }
        $("txtTags").value=val;
    }
    //打开模式对话框（图片选择）
    function OpenDialogPage(){
        if (navigator.appVersion.indexOf("MSIE") == -1){
            window.open('Picture_Picture_Manage_Dialog.aspx?d=' + Date(),'newWin','modal=yes,width=620,height=620,top=200,left=300,resizable=no,scrollbars=no');
        }else{
            var GetValue = showModalDialog('Picture_Picture_Manage_Dialog.aspx?d=' + Date(),'','dialogWidth:620px;dialogHeight:620px;')
            if (GetValue != null) {
                var oEditor = FCKeditorAPI.GetInstance('txtContent'); 
                    oEditor.InsertHtml("<img src='<%=BaseConfigPath %>" + GetValue + "'>");
            } 
        }
    }
    
    //process the return value for firefox
    function returnAction(src){
        if (src.length > 0) {
            if(_control=="editor"){
                var oEditor = FCKeditorAPI.GetInstance('txtContent'); 
                oEditor.InsertHtml("<img src='<%=BaseConfigPath %>" + src + "'>");
            }
        }            
    }
        
    //打开标签管理对话框
    function OpenTag(){
        showModalDialog('Product_Tag_Manage_Dialog.aspx?d=' + Date(),'','dialogWidth:638px;dialogHeight:378px;scroll:yes;');
    }            

    //选项卡切换脚本
    function change_option(number,index){
        for (var i = 1; i <= number; i++) {
            try{
                $("current"+i).className = '';
                $("content"+i).hide(1000);
            }catch(e){}
        }
 
        try{
            $("current"+index).className = 'current';
            $("content"+index).show(1000);
            $('TabId').value = index;
        }catch(e){}
                
        //切换到多图选项卡时加载默认大图
        if(parseInt(index)==4 && $("mainImg"))
            Product.mainImgLoader($("mainImg"))
    }
    function InitUnit(obj){
        $('txtUnit').value = obj.value;
    }
    function chk_storage(v){
        if(v) $("trIsAlert").show();
        else $("trIsAlert").hide();
    }
    function chk_virtual(v){
        if(v) {
            $ES("#btnAddStorage,#trWeight","table1").hide();
            $("txtProductWeight").value=0;
            if($("txtStorage")){
                $("txtStorage").disabled=true;
                $("txtStorage").value=0;
            }
        }else{
            $ES("#btnAddStorage,#trWeight","table1").show();
            if($("txtStorage")){
                $("txtStorage").disabled=false;
                $("txtStorage").value="";
            }
        }
    }
    function chk_change(v){
        if(v) $("trIsChangedBuy").show();
        else $("trIsChangedBuy").hide();
    }
    function chk_score(v){
        if(v) $("trIsChanged").show();
        else $("trIsChanged").hide();
    }
    function chk_price(o){
        if(!o.checked){ 
            $("trAutoComputerMemPrice").show();
            autoPrice();
        }
        else $("trAutoComputerMemPrice").hide();
    }
    function autoPrice(){
        $$("#GridViewUserGroup tr[id]").each(function(v,i){
            var percent = $(v).getElement("td:nth-child(4)").get("text");
            var price = $("txtMemberPrice").value != ""?$("txtMemberPrice").value:"0";
            $(v).getLast().getElement("input").value = (parseFloat(price)*parseInt(percent)/100).round(2);
        });
    }
    
    function InsertCC(GetValue)
    { 
        var oEditor = FCKeditorAPI.GetInstance('txtContent'); 
        GetValue = cc_flash(GetValue.replace('[cc]').replace('[/cc]',''));
        oEditor.InsertHtml(GetValue);
    }
    function cc_flash(cc_url) 
    { 
        return '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
                +'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="400" id="bokeccplayer">'
                +' <param name="movie" value="http://union.bokecc.com/'+cc_url+'" /> '
                +'<param name="allowFullScreen" value="true" />'
                +'<param name="allowScriptAccess" value="always" />'
                +'<param name="wmode" value="opaque" />'
                +'<embed src="http://union.bokecc.com/'+cc_url
                +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="400" name="bokeccplayer" allowFullscreen="true" allowScriptAccess="always" wmode="opaque"></embed> </object>'; 
    }
    </script>
    <style type="text/css">
    a {
      color:#000000;
      text-decoration:none;
    }
       
    #header {
      height:26px;
      background:url(images/bg_cate.gif) bottom repeat-x;
      margin-bottom:20px;
    }
    #header ul {
      margin:0;
      padding:0px;
      list-style:none;
    }
    #header li {
      float:left;
     background:#DCE1EF;
     border:solid 1px #8EA2C2;
     border-bottom:solid 0px #8EA2C2;
     margin-left:2px;
    }
    #header a {
      display:block;
     padding:5px 10px 4px;
    }
    #header .current {
     background:#FFFFFF;
     border:solid 1px #8EA2C2;
     border-bottom:solid 1px #ffffff;
     
    }
    #header .current a{
     padding-bottom:5px;
    }
    .content {
     
    }
    .content .contentHeader {
      background-color:#BCC7E0;
      border:solid 1px #4B66A5;
      font-weight:bold;
    }

    .content .contentMain {
     border-left:solid 1px #4B66A5;
     border-top:solid 0px #4B66A5;
     border-right:solid 1px #4B66A5;
     border-bottom:solid 1px #4B66A5;
    }
    #table5 li {float:left;}
    .progress {padding:4px 0; margin:4px 0 0 20%; width:200px; text-align:center; color:#ff6600; background-color:#f1f1e1; border:1px #ff9933 solid;}
    /*帮助提示层样式*/
    .tip-title {
        background:#D5EBF9 none repeat scroll 0 0;
        border:1px solid #A5CFE9;
        color:#4B7A98;
        font-family:arial;
        font-weight:bold;
        filter:alpha(opacity=85);
        opacity:0.85;
        width:150px;
    }
    .tip-text {
        background:#FFFFFF none repeat scroll 0 0;
        border-bottom:1px solid #A5CFE9;
        border-left:1px solid #A5CFE9;
        border-right:1px solid #A5CFE9;
        color:#1B4966;
        font-family:arial;
        opacity:0.85;
        filter:alpha(opacity=85);
        width:150px;
        color:red;
    }
    /*end*/
    </style>
    <style type="text/css">
    #CategoryLevel ul{
        border:1px solid #A4B2BD;
        float:left;
        height:317px;
        margin:0pt 6px 0pt 0pt;
		background:#FFFFFF;
        overflow:auto;
        padding:0pt;
        width:188px;
    }
    
    #CategoryLevel ul li{
        border-bottom:1px solid #F7F7F7;
        color:#444444;
        cursor:default;
        height:20px;
        line-height:20px;
        list-style-type:none;
        margin:0pt 1px !important;
        overflow:hidden;
        padding:0pt;
        text-indent:3px;
    }
    
    #CategoryLevel ul li.IsFather {
        background-image:url(images/publishitem_subcate_arrow.gif);
        background-position:99% 50%;
        background-repeat:no-repeat;
    }
    
    #CategoryLevel ul li.Selected {
        background-color:#F7FCFF;
        border:1px solid #A4B2BD;
		border-width:1px 0;
        color:#006623;
    }
</style>
</head>
<body>

    <!--查看多图html-->
    <div id="viewPicInfo" style="display:none">
        <div class="mainHead">您可以在本页面下方复制图片的URL，该URL方便您将商品图片粘贴到需要使用该图片的目标位置 </div>
        <div class="division" style="cursor:move">
          <table cellspacing="0" cellpadding="0" border="0" width="100%" class="shopping_setting">
            <tbody>
              <tr>
                <th style="width:100px;">商品原图：</th>
                <td><input id="sourceSrc" style='width:90%;font-size:9px;color:#000;padding:2px;' type="text" class="shadow" readonly="true" onclick="this.focus();this.select()"/></td>
              </tr>
              <tr >
                <th style="width:100px;">商品缩略图：</th>
                <td><input id="smallSrc" style='width:90%;font-size:9px;color:#000;padding:2px;' type="text" class="shadow" readonly="true" onclick="this.focus();this.select()"/></td>
              </tr>
            </tbody>
          </table>
        </div>
    </div>
    
    <form id="form1" runat="server">
    
    <ajax:ScriptManager ID="ScriptManager1" runat="server">
        </ajax:ScriptManager>
    
        <div class="OperateTitle">
            <div>
                <asp:Label ID="lblAdd" runat="server" Text="【 商品添加 】"></asp:Label>
                <asp:Label ID="lblEdit" runat="server" Text="【 商品编辑 】" Visible="false"></asp:Label>
                <a href="Product_Product_Manage.aspx" title="返回商品列表">返回列表</a>
            </div>
        </div>

        <script language="javascript" type="text/javascript">
        function CategoryClick(obj){
            obj.parentNode.className = 'Selected' + obj.className;
        }
        </script>

        <asp:Panel ID="CategoryArea" runat="server" Width="100%">
            <div>
                <div style="height: 30px; line-height: 30px; padding-left: 20px; color: #000000">
                    <asp:Label ID="lblSelectCategoryFirst" runat="server" Text="请先选择商品所在的分类"></asp:Label>&nbsp;&nbsp;
                    <asp:Label ID="lblHistoryCategory" runat="server" Text="历史选择分类：" Visible="False"></asp:Label>
                    <asp:DropDownList ID="ddlHistoryCategory" runat="server" Visible="False">
                    </asp:DropDownList>
                    <asp:Button ID="btnHistoryConfirm" runat="server" CssClass="button" Text="确定" OnClick="btnHistoryConfirm_Click"
                        Visible="False" />
                    <asp:Button ID="btnClearCookies" runat="server" CssClass="button" Text="清除历史记录" OnClick="btnClearCookies_Click"
                        Visible="False" />
                </div>
                &nbsp;&nbsp;
                <div id="CategoryLevel" style="background: #f7f7f7; border: 1px #f1f1f1 solid; border-width: 1px 0px;
                    height: 337px">
                    <div style="width: 815px">
                        <div style="padding: 10px 0 0 20px">
                            <asp:Repeater ID="rpCategory" runat="server">
                                <ItemTemplate>
                                    <asp:HiddenField ID="level" runat="server" Value='<%#Eval("Level") %>' />
                                    <ul>
                                        <asp:Repeater ID="CategoryList" runat="server">
                                            <ItemTemplate>
                                                <li id="CateLi" runat="server" class='<%#Eval("keywords") %>'>
                                                    <asp:LinkButton ID="name" runat="server" OnClick="LinkClick" Text='<%#Eval("Name") %>'
                                                        Width="160px"></asp:LinkButton>
                                                    <asp:HiddenField ID="value" runat="server" Value='<%#Eval("ID") %>' />
                                                    <asp:HiddenField ID="level" runat="server" Value='<%#Eval("level") %>' />
                                                    <asp:HiddenField ID="childcount" runat="server" Value='<%#Eval("childcount") %>' />
                                                </li>
                                            </ItemTemplate>
                                        </asp:Repeater>
                                    </ul>
                                </ItemTemplate>
                            </asp:Repeater>
                        </div>
                    </div>
                    <br clear="all" />
                    <div align="center" style="height: 30px; line-height: 36px">
                        <asp:Button ID="CategorySubmit" runat="server" Text="选好分类，进入下一步" OnClick="ShowProductArea"
                            Enabled="false" CssClass="button"></asp:Button>
                    </div>
                </div>
            </div>
            <asp:HiddenField ID="HiddenCategoryID" runat="server" />
        </asp:Panel>
        <asp:Panel ID="ProductArea" Visible="false" runat="server" Width="100%">
            <div id="addcontent">
            
                <div id="header">
                    <ul>
                        <li id="current1"><a style="cursor: pointer;" onclick="change_option(11,1);"><asp:Label ID="lblBaseInfoTab" runat="server" Text="基本信息"></asp:Label></a></li><li id="current11" runat="server"><a style="cursor: pointer;" onclick="change_option(11,11);"><asp:Label ID="lblSpec" runat="server" Text="商品规格"></asp:Label></a></li><li id="current2" runat="server"><a style="cursor: pointer;" onclick="change_option(11,2);"><asp:Label ID="lblCategoryTab" runat="server" Text="商品属性"></asp:Label></a></li><li id="current4" runat="server"><a style="cursor: pointer;" onclick="change_option(11,4);"><asp:Label ID="lblImageTab" runat="server" Text="商品图片"></asp:Label></a></li><li id="current5" runat="server"><a style="cursor: pointer;" onclick="change_option(11,5);"><asp:Label ID="lblContentTab" runat="server" Text="详细信息"></asp:Label></a></li><li id="current6" runat="server"><a style="cursor: pointer;" onclick="change_option(11,6);"><asp:Label ID="lblSeoTab" runat="server" Text="搜索优化"></asp:Label></a></li><li id="current7" runat="server"><a style="cursor: pointer;" onclick="change_option(11,7);"><asp:Label ID="lblFittingTab" runat="server" Text="配件"></asp:Label></a></li><li id="current8" runat="server"><a style="cursor: pointer;" onclick="change_option(11,8);"><asp:Label ID="lblRelatedTab" runat="server" Text="相关商品"></asp:Label></a></li><li id="current9" runat="server"><a style="cursor: pointer;" onclick="change_option(11,9);"><asp:Label ID="lblRelatedArticleTab" runat="server" Text="相关文章"></asp:Label></a></li><li id="current10" runat="server"><a style="cursor: pointer;" onclick="change_option(11,10);"><asp:Label ID="lblExtendTab" runat="server" Text="扩展分类"></asp:Label></a></li></ul>
                </div>
                <div id="content">
                    <table id="table00" runat="server" width="100%" border="0" align="center" cellpadding="0"
                        cellspacing="0">
                        <tr>
                            <td width="20%" align="right" bgcolor="#FFFFFF">
                                <img class="notice-help" src="images/help.gif" title="商品分类" rel="此项与品牌、分类属性、配件类型相关。重新选择后，相关会丢失，需要重新填写。"/>
                                <asp:Label ID="lblCategoryNameInfo" runat="server" Text="当前分类："></asp:Label>
                            </td>
                            <td bgcolor="#FFFFFF" align="left" colspan="3">
                                <asp:Label ID="lblCategoryName" runat="server" Text="" Style="line-height: 12px;"></asp:Label>
                                <asp:Button ID="btnEditCategory" runat="server" Text="编辑" CssClass="button" CausesValidation="False"
                                    OnClick="btnEditCategory_Click" Style="vertical-align: middle" /></td>
                        </tr>
                        <tr>
                            <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                                <asp:Label ID="lblName" runat="server" Text="商品名称："></asp:Label>
                            </td>
                            <td bgcolor="#FFFFFF" align="left" style="width: 326px">
                                <asp:TextBox ID="txtName" runat="server" Width="250px" MaxLength="50"></asp:TextBox>
                                <span class="NeedMsg">*</span>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtName"
                                    ErrorMessage="不能为空"></asp:RequiredFieldValidator></td>
                            <td height="30" align="right" bgcolor="#FFFFFF" style="width: 110px">
                                <asp:Label ID="lblShortName" runat="server" Text="商品简称："></asp:Label>
                            </td>
                            <td bgcolor="#FFFFFF" align="left">
                                <asp:TextBox ID="txtShortName" runat="server" MaxLength="20"></asp:TextBox>
                                <span class="NeedMsg">*</span>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtShortName"
                                    ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right" bgcolor="#FFFFFF" style="height: 30px; border-bottom: 1px #eeeeee solid">
                                <img class="notice-help" src="images/help.gif" title="商品编号" rel="可以是商品货号，条形码等。可以手动输入，也可以点“编辑”根据系统设置自动生成。为空时系统会默认生成一个编号"/>
                                <asp:Label ID="lblNumber" runat="server" Text="商品编号："></asp:Label>
                            </td>
                            <td bgcolor="#FFFFFF" align="left" colspan="3" style="height: 30px; border-bottom: 1px #eeeeee solid">
                                <asp:TextBox ID="txtNumber" runat="server" Width="250px" MaxLength="50"></asp:TextBox>
                                <input type="button" name="btnEditNumber" value="编辑" id="btnEditNumber" class="button"
                                    runat="server" /></td>
                        </tr>
                        <tr>
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <img class="notice-help" src="images/help.gif" title="市场价格" rel="商品在市场上销售价格。"/>
                                <asp:Label ID="lblMarketPrice" runat="server" Text="市场价格："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff" style="color: red">
                                <asp:TextBox ID="txtProductMarketPrice" runat="server" Width="100px"></asp:TextBox>
                                <span style="color: #ff0000">*</span><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtProductMarketPrice"
                                    Display="Dynamic" ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtProductMarketPrice"
                                    Display="Dynamic" ErrorMessage="只能为数字,长度不能超过9位" ValidationExpression="^[\d]{0,9}([\.]+\d+){0,9}$"></asp:RegularExpressionValidator>
                            </td>
                            <td align="right" bgcolor="#ffffff" height="30" style="width: 110px">
                                <img class="notice-help" src="images/help.gif" title="商城价格" rel="该商品在本站的销售价格。注意，客户购买时所有价格均以此价格为计算基础。如果是虚拟商品，则代表虚拟卡的面值。"/>
                                <asp:Label ID="lblMemberPrice" runat="server" Text="商城价格："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtMemberPrice" runat="server" Width="100px"></asp:TextBox>
                                <span style="color: #ff0000">*</span><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtMemberPrice"
                                    Display="Dynamic" ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtMemberPrice"
                                    Display="Dynamic" ErrorMessage="只能为数字,长度不能超过9位" ValidationExpression="^[\d]{0,9}([\.]+\d+){0,9}$"></asp:RegularExpressionValidator>
                                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtProductMarketPrice"
                                    ControlToValidate="txtMemberPrice" ErrorMessage="商城的价格大于市场价格" Operator="LessThanEqual" Type="Double"></asp:CompareValidator></td>
                        </tr>
                    </table>
             
                </div>
                
                
                <!--基本信息开始-->
                <div id="content1" class="content">
                    <table id="table1" runat="server" width="100%" border="0" align="center" cellpadding="0"
                        cellspacing="0">
                        <tr id="trBrand" runat="server">
                            <td align="right" bgcolor="#ffffff" width="20%" style="height: 30px">
                                <asp:Label ID="lblBrandId" runat="server" Text="商品品牌："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff" style="height: 30px">
                                <asp:DropDownList ID="ddlBrandId" runat="server" Width="150px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                                <img class="notice-help" src="images/help.gif" title="库存警告" rel="如开启此项设置，则当库存低于设置值时，会在后台首页提示库存不足"/>
                                <asp:Label ID="lblIsAlert" runat="server" Text="库存警告："></asp:Label>
                            </td>
                            <td bgcolor="#FFFFFF" align="left">
                                <asp:RadioButtonList ID="rblIsAlert" runat="server" CssClass="radioaspx" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="0" onclick="chk_storage(0)">否</asp:ListItem>
                                    <asp:ListItem Value="1" onclick="chk_storage(1)">是</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr id="trIsAlert" runat="server" style="display:none;">
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <asp:Label ID="lblAlertCount" runat="server" Text="库存警告数量："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtAlertCount" runat="server" Width="100px" Text="0"></asp:TextBox>
                                <span style="color: #ff0000">*</span><asp:RequiredFieldValidator ID="RequiredFieldValidator14"
                                    runat="server" ControlToValidate="txtAlertCount" Display="Dynamic" ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator12" runat="server"
                                    ControlToValidate="txtAlertCount" Display="Dynamic" ErrorMessage="只能为数字,长度不能超过9位" ValidationExpression="^[\d]{0,9}([\.]+\d+){0,9}$"></asp:RegularExpressionValidator></td>
                        </tr>
                        <tr runat="server" id="trStock">
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <asp:Label ID="lblStorage" runat="server" Text="库存："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtStorage" runat="server" Width="100px"></asp:TextBox>
                                <asp:Label ID="lblStorageCount" runat="server" Visible="False"></asp:Label>
                                <input type="button" id="btnAddStorage" runat="server" value="入库" visible="False"
                                    class="button" /><span style="color: #ff0000">*</span>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="不能为空"
                                    ControlToValidate="txtStorage" Display="Dynamic"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="只能为数字,长度不能超过9位"
                                    ValidationExpression="^[\d]{0,9}([\.]+\d+){0,9}$" ControlToValidate="txtStorage" Display="Dynamic"></asp:RegularExpressionValidator>
                                <asp:TextBox ID="txtUnit" runat="server" Width="100px" MaxLength="10"></asp:TextBox>
                                <asp:DropDownList ID="ddlStorageUnit" runat="server" onchange="InitUnit(this)" Width="100px">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr runat="server" id="trWeight">
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <img class="notice-help" src="images/help.gif" title="商品重量" rel="此项设置会关联商品运费的计算。注意单位是KG."/>
                                <asp:Label ID="lblWeight" runat="server" Text="商品重量："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtProductWeight" runat="server" Width="100px" ></asp:TextBox>
                                <asp:Label ID="lblWeightUnit" runat="server" Text="KG"></asp:Label>
                                <span style="color: #ff0000">*</span>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="不能为空"
                                    ControlToValidate="txtProductWeight" Display="Dynamic"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ErrorMessage="只能为数字,长度不能超过9位"
                                    ValidationExpression="^[\d]{0,9}([\.]+\d+){0,9}$" ControlToValidate="txtProductWeight" Display="Dynamic"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" bgcolor="#ffffff" width="20%" style="height: 30px">
                                <asp:Label ID="lblProperty" runat="server" Text="商品属性："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff" style="height: 30px">
                                <asp:CheckBox ID="cbIsOnSale" runat="server" CssClass="checkboxaspx" Text="上架" Checked="true" />
                                <asp:CheckBox ID="cbIsRecommond" runat="server" CssClass="checkboxaspx" Text="推荐" />
                                <asp:CheckBox ID="cbIsNew" runat="server" CssClass="checkboxaspx" Text="新品" />
                                <asp:CheckBox ID="cbIsHot" runat="server" CssClass="checkboxaspx" Text="热点" />
                                <asp:CheckBox ID="cbIsSpecialOffer" runat="server" CssClass="checkboxaspx" Text="特价" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" bgcolor="#ffffff" width="20%" style="height: 30px">
                                <asp:Label ID="Label1" runat="server" Text="商品标签："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff" style="height: 30px">
                                <asp:TextBox ID="txtTags" runat="server" Height="80px" TextMode="MultiLine" Width="420px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="right" bgcolor="#ffffff" width="20%" style="height: 30px">
                            <input type="button" name="tagManageButton" value="管理" id="Button1" class="button" onclick="OpenTag();"/>
                                &nbsp;</td>
                            <td align="left" bgcolor="#ffffff" style="height: 30px">
                                <asp:Panel ID="TagPanel" runat="server" style="white-space:18px;">
                                </asp:Panel>
                            </td>
                        </tr>                                   
                        <tr id="trVirtualProduct" runat="server">
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <img class="notice-help" src="images/help.gif" title="虚拟商品" rel="如果是虚拟商品，如点卡、充值卡等。可以在商品添加后进行补货操作。注意，虚拟商品不能通过入库操作修改库存，只能通过补货来改变库存。"/>
                                <asp:Label ID="lbEntity" runat="server" Text="虚拟商品："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <div>
                                    <div style="float: left;">
                                        <asp:RadioButtonList ID="rblIsVirtual" runat="server" CssClass="radioaspx" RepeatDirection="Horizontal">
                                            <asp:ListItem Value="0" onclick="chk_virtual(0)">否</asp:ListItem>
                                            <asp:ListItem Value="1" onclick="chk_virtual(1)">是</asp:ListItem>                                            
                                        </asp:RadioButtonList>
                                    </div>
                                    <div style="float: left; padding: 12px 0 0 6px">
                                        <input type="button" id="btnADDVirtualGood" runat="server" value="补货" visible="False"
                                            class="button" />
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr id="trChangeProduct" runat="server">
                            <td align="right" bgcolor="#ffffff" style="height: 30px" width="20%">
                                <img class="notice-help" src="images/help.gif" title="换购商品" rel="选择是，则此商品即为换购商品。需要设置换购价格和订单满足金额。订单满足金额是指此次购买商品的总计金额。只有满足此金额，才能以换购价购买该商品"/>
                                <asp:Label ID="lblIsChangedBuy" runat="server" Text="是否换购商品："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff" style="height: 30px">
                                <asp:RadioButtonList ID="rblIsChangedBuy" runat="server" CssClass="radioaspx" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="0" onclick="chk_change(0)">否</asp:ListItem>
                                    <asp:ListItem Value="1" onclick="chk_change(1)">是</asp:ListItem>                                      
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr id="trIsChangedBuy" runat="server" style="display:none;">
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <img class="notice-help" src="images/help.gif" title="订单满足金额" rel="此次购买商品的总计金额，注意不包括运费、发票费用等其他费用"/>
                                <asp:Label ID="lblPresentPrice" runat="server" Text="订单满足金额："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtNeedPrice" runat="server" Width="100px" Text="0"></asp:TextBox>
                                <span style="color: #ff0000">*</span><asp:RegularExpressionValidator ID="RegularExpressionValidator7" runat="server" ControlToValidate="txtNeedPrice"
                            Display="Dynamic" ErrorMessage="只能为数字,长度不能超过16位" ValidationExpression="^[\d]{0,16}([\.]+\d+){0,16}$"></asp:RegularExpressionValidator>
                                <img class="notice-help" src="images/help.gif" title="换购价格" rel="当购买商品总金额≥订单满足金额时，换购此商品的价格。"/>
                                <asp:Label ID="lblChangePrice" runat="server" Text="换购价格："></asp:Label>
                                <asp:TextBox ID="txtPresentPrice" runat="server" Width="100px" Text="0"></asp:TextBox><span
                                    style="color: #ff0000">*</span>
                                    
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator8" runat="server" ControlToValidate="txtPresentPrice"
                            Display="Dynamic" ErrorMessage="只能为数字,长度不能超过16位" ValidationExpression="^[\d]{0,16}([\.]+\d+){0,16}$"></asp:RegularExpressionValidator>
                                    </td>
                        </tr>
                        <tr id="trScoreChange" runat="server">
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <img class="notice-help" src="images/help.gif" title="积分兑换" rel="选择是，则该商品允许用积分进行兑换。"/>
                                <asp:Label ID="lblIsChanged" runat="server" Text="是否积分兑换："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:RadioButtonList ID="rblIsChanged" runat="server" CssClass="radioaspx" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="0" onclick="chk_score(0)">否</asp:ListItem>
                                    <asp:ListItem Value="1" onclick="chk_score(1)">是</asp:ListItem>                                
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr id="trIsChanged" runat="server" style="display:none;">
                            <td align="right" bgcolor="#ffffff" width="20%" style="height: 30px">
                                <img class="notice-help" src="images/help.gif" title="兑换积分" rel="兑换该商品所需要的积分"/>
                                <asp:Label ID="lblChangeScore" runat="server" Text="兑换积分："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff" style="height: 30px">
                                <asp:TextBox ID="txtChangeScore" runat="server" Width="100px" Text="0"></asp:TextBox>
                                <span style="color: #ff0000">*</span>
                                 <asp:RegularExpressionValidator ID="RegularExpressionValidator9" runat="server" ControlToValidate="txtChangeScore"
                            Display="Dynamic" ErrorMessage="只能为数字,长度不能超过10位" ValidationExpression="^[\d]{0,10}([\.]+\d+){0,10}$"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <asp:Label ID="lblOrderId" runat="server" Text="商品排序："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtOrderId" runat="server" Width="100px"></asp:TextBox>&nbsp; <span style="color: #ff0000">*</span>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator10" runat="server"
                                    ControlToValidate="txtOrderId" Display="Dynamic" ErrorMessage="只能为数字,长度不能超过10位"
                                    ValidationExpression="^[\d]{0,10}([\.]+\d+){0,10}$"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr id="trHitCount" runat="server">
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <asp:Label ID="lblHitCount" runat="server" Text="商品浏览次数："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtHitCount" runat="server" Width="100px">0</asp:TextBox>
                                <span style="color: #ff0000">*</span>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator11" runat="server"
                                    ControlToValidate="txtHitCount" Display="Dynamic" ErrorMessage="只能为数字,长度不能超过10位"
                                    ValidationExpression="^[\d]{0,10}([\.]+\d+){0,10}$"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr id="trScore" runat="server">
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <img class="notice-help" src="images/help.gif" title="赠送积分" rel="购买该商品赠送的积分"/>
                                <asp:Label ID="lblScore" runat="server" Text="赠送积分："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtScore" runat="server" Width="100px">0</asp:TextBox>
                                 <span style="color: #ff0000">*</span>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator13" runat="server"
                                    ControlToValidate="txtScore" Display="Dynamic" ErrorMessage="只能为数字,长度不能超过10位"
                                    ValidationExpression="^[\d]{0,10}([\.]+\d+){0,10}$"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr id="trBuyNumber" runat="server">
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <img class="notice-help" src="images/help.gif" title="起购数量" rel="一次购买该商品至少需要购买的数量。如设置为5，则一次购买该商品至少需要购买5件。注意：一次购买数量只需要≥起购数量即可，而不是起购数量的倍数。1为不限制"/>
                                <asp:Label ID="lblBuyNumber" runat="server" Text="起购数量："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtBuyNum" runat="server" Width="100px">1</asp:TextBox>
                                  <span style="color: #ff0000">*</span>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator14" runat="server"
                                    ControlToValidate="txtBuyNum" Display="Dynamic" ErrorMessage="只能为数字,长度不能超过10位"
                                    ValidationExpression="^[\d]{0,10}([\.]+\d+){0,10}$"></asp:RegularExpressionValidator>
                           
                            </td>
                        </tr>
                        <tr id="trIsPresent" runat="server" visible="true">
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">　
                                <img class="notice-help" src="images/help.gif" title="是否为商品配件" rel="如果选择此项，则商品只能做为其他的商品的配件进行销售，而不能单独销售."/>
                                <asp:Label ID="lblIsPresent" runat="server" Text="是否为商品配件："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:RadioButtonList ID="rblIsPresent" runat="server" CssClass="radioaspx" RepeatDirection="Horizontal">
                                    <asp:ListItem Value="0">否</asp:ListItem>
                                    <asp:ListItem Value="1">是</asp:ListItem>                                    
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <asp:Label ID="lblShortContent" runat="server" Text="商品简述："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtShortContent" runat="server" TextMode="MultiLine" Height="70px"
                                    Width="300px"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </div>
                <!--分类价格开始-->
                <div id="content2" class="content" style="display: none">
                  <ajax:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <table id="table2" runat="server" width="100%" border="0" align="center" cellpadding="0"
                                cellspacing="0">
                                <tr>
                                    <td align="right" bgcolor="#ffffff" style="height: 30px" width="20%">
                                        <asp:Label ID="lblProductType" runat="server" Text="商品类型："></asp:Label>
                                    </td>
                                    <td align="left" bgcolor="#ffffff" style="height: 30px">
                                        <asp:DropDownList ID="ddlProductType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlProductType_SelectedIndexChanged"></asp:DropDownList>
                                    </td>
                                </tr>
                                <tr id="trProperty" visible="false">
                                    <td align="right" bgcolor="#ffffff" style="height: 30px" width="20%">
                                        <img class="notice-help" src="images/help.gif" title="商品属性" rel="是同一分类下的商品具有某些共同的属性。如：手机商品具有像素、屏幕、mp3功能等"/>
                                        <asp:Label ID="CategoryProperty" runat="server" Text="商品属性："></asp:Label>
                                    </td>
                                    <td align="left" bgcolor="#ffffff" style="height: 30px">
                                        <asp:Repeater ID="rptProperty" runat="server" OnItemDataBound="rptProperty_ItemDataBound">
                                            <HeaderTemplate>
                                                <table width="600">
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <tr>
                                                    <td width="100">
                                                        <asp:Label ID="lbPID" runat="server" Visible="false" Text='<%#Eval("ID") %>'></asp:Label>
                                                        <asp:Label ID="lbInputType" runat="server" Visible="false" Text='<%#Eval("InputType") %>'></asp:Label>
                                                        <asp:Label ID="lbPName" runat="server" Text='<%#Eval("Name") %>'></asp:Label>：
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlRptValue" runat="server" AppendDataBoundItems="true" DataTextField="Value" DataValueField="Id">
                                                            <asp:ListItem Value="">请选择</asp:ListItem>
                                                        </asp:DropDownList>
                                                        <asp:TextBox ID="txtRptValue" runat="server"></asp:TextBox>
                                                    </td>
                                                </tr>
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                </table>
                                            </FooterTemplate>
                                        </asp:Repeater>
                                    </td>
                                </tr>
                            </table>
                            <table id="tbSelfProperty" runat="server" width="100%" border="0" align="center" cellpadding="0"
                                    cellspacing="0" visible="false">
                                <tr><td width="20%"></td><td valign="bottom" style="color:#4B6888; height:22px;">如果商品属性中没有您要添加商品的相关其它属性，可使用自定义属性来添加。</td></tr>
                                <tr>
                                    <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                                        <img class="notice-help" src="images/help.gif" title="自定义属性" rel="如：颜色、尺寸、联系电话等是属性名，红色，14寸等是属性值。注意：如果属性值与价格有关，请在商品规格中设置，此处的属性只做展示用。"/>
                                        <asp:Label ID="Label12" runat="server" Text="自定义属性："></asp:Label>
                                    </td>
                                    <td bgcolor="#FFFFFF" align="left">
                                        <div class="listborder">
                                            <div>
                                                <cc1:V5ShopGridView ID="GridViewSelfProperty" runat="server" Width="350px" PagerSettings-Visible="false"
                                                    AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BorderWidth="0px"
                                                    CacheName="Property" CssClass="datalist" GridLines="None" PageSize="15" TableName="Property">
                                                    <PagerSettings Mode="NumericFirstLast" Visible="False" />
                                                    <HeaderStyle CssClass="category" />
                                                    <Columns>
                                                        <asp:templatefield>
                                                            <itemtemplate>
                                                            <input runat="server" Value='<%# Eval("ID") %>' ID="CheckBoxID3" type="checkbox" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" mouse="out" class="checkbox">
                                                            </itemtemplate>
                                                        </asp:templatefield>
                                                        <asp:boundfield datafield="Id" headertext="ID" />
                                                        <asp:boundfield datafield="Name" headertext="属性名称" />
                                                        <asp:boundfield datafield="Value" headertext="属性值" />
                                                    </Columns>
                                                </cc1:V5ShopGridView>
                                            </div>
                                        </div>
                                        <div style="padding: 3px 25px; color: #4B6888; border-bottom: 1px #CCCCCC solid">
                                            <asp:LinkButton ID="btnSelfPropertyAdd" runat="server" ForeColor="#4B6888" CausesValidation="False"
                                                OnClick="btnSelfPropertyAdd_Click"><img src="images/icon/key_detail.gif" /> 添加</asp:LinkButton>
                                            <asp:LinkButton ID="btnSelfPropertyEdit" runat="server" ForeColor="#4B6888" OnClientClick="return CheckEdit()"
                                                CausesValidation="False" OnClick="btnSelfPropertyEdit_Click"><img src="images/icon/key_edit.gif" /> 编辑</asp:LinkButton>
                                            <asp:LinkButton ID="btnSelfPropertyDel" runat="server" ForeColor="#4B6888" OnClientClick="return CheckDel()"
                                                CausesValidation="False" OnClick="btnSelfPropertyDel_Click"><img src="images/icon/key_delete.gif" /> 删除</asp:LinkButton>
                                        </div>
                                        <div style="padding: 3px 25px;" id="divSelfProperty" runat="server" visible="false">
                                        <table id="Table14" runat="server">
                                            <tr>
                                                <td>
                                                    <img class="notice-help" src="images/help.gif" title="属性名称" rel="注意属性名和属性值均不能为空，否则自动忽略，不会被添加。"/>
                                                    <asp:Label ID="lblSelfProperty" runat="server" Text="属性名称："></asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtSelfProperty" runat="server" Width="80px" MaxLength="50"></asp:TextBox></td>
                                                <td>
                                                    &nbsp;&nbsp;<asp:Label ID="lblSelfPropertyValue" runat="server" Text="属性值："></asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="txtSelfPropertyValue" runat="server" Width="80px" MaxLength="250"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                </td>
                                                <td colspan="3">
                                                    <asp:Button ID="btnSelfPropertyAdd_T" runat="server" Text="添加" CssClass="button"
                                                        CausesValidation="false" OnClick="btnSelfPropertyAdd_T_Click" />
                                                    <asp:Button ID="btnSelfPropertyEdit_T" runat="server" Text="更新" CssClass="button"
                                                        CausesValidation="false" OnClick="btnSelfPropertyEdit_T_Click" Visible="false" />
                                                    <asp:Label ID="lblPropertyHelp" runat="server" Text="注意属性名和属性值均不能为空，否则自动忽略，不会被添加。"
                                                        Visible="false"></asp:Label>
                                                </td>
                                            </tr>
                                        </table>
                                        </div>
                                    </td>
                                </tr>
                            </table>                            
                        </ContentTemplate>
                    </ajax:UpdatePanel>
                    <ajax:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" DisplayAfter="100">
                    <ProgressTemplate>
                    <div class="progress">正在加载，请稍候……</div>
                    </ProgressTemplate>
                    </ajax:UpdateProgress>                    
                </div>
                <!--商品图片-->
                <div id="content4" class="content" style="display: none">
                    <table id="table4" runat="server" width="100%" border="0" align="center" cellpadding="0"
                        cellspacing="0">
                        <tr>
                            <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                                <asp:Label ID="lblVideoUrl" runat="server" Text="视频文件地址："></asp:Label>
                            </td>
                            <td bgcolor="#FFFFFF" align="left">
                                <asp:TextBox ID="txtVideoUrl" runat="server" Width="300px" MaxLength="150"></asp:TextBox>
                                <span class="NeedMsg">
                                    <input type="button" value="选择视频" onclick="OpenDialogDocuments('txtVideoUrl')" class="button"
                                        id="btnSlectVideo" runat="server" /></span>    
                            </td>
                        </tr>
                        <tr>
                            <td align="right" bgcolor="#ffffff" width="20%" style="height: 30px">
                                <asp:Label ID="lblVideoName" runat="server" Text="视频名称："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff" style="height: 30px">
                                <asp:TextBox ID="txtVideoName" runat="server" Width="300px" MaxLength="100"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" bgcolor="#ffffff" style="height: 30px" width="20%">
                                <asp:Label ID="lblVideoSize" runat="server" Text="视频宽*高："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff" style="height: 30px">
                                <asp:TextBox ID="txtVideoWidth" runat="server" Width="100px">0</asp:TextBox>
                                *
                                <asp:TextBox ID="txtVideoHeight" runat="server" Width="100px">0</asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                商品多图：&nbsp;
                            </td>
                            <td align="left" bgcolor="#ffffff" style="height:200px;">
                                <div id="action-pic-bar" class="goods-pic-area division" style="margin-left:2px;">
                                  <div class="action-bar clearfix">
                                    <button type="button" id="fix_fl10upload_panel" style="float:left;width:90px;" class="btn-up"><span><img src="images/product/transparent.gif" class="imgbundle icon" style="width:15px;height:16px;" />上传图片</span></button>           
                                    <span class="btn-span">从列表中选择</span>
                                    
                                  </div>
                                  <div class="pic-area">
                                    <div class="textcenter" id="x-main-pic">
                                    <asp:Literal ID="ltlAddMulti" runat="server">
                                      <p align="center"><br>
                                        <br>
                                        此处显示商品页默认图片<br>
                                        [您还未上传商品图片！]</p>                                        
                                    </asp:Literal>
                                    <asp:Literal ID="ltlEditMulti" runat="server"></asp:Literal>
                                    </div>
                                    <div id="all-pics">
                                        <asp:Literal ID="ltlEditMultiList" runat="server"></asp:Literal></div>
                                  </div>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                            </td>
                            <td align="left" bgcolor="#ffffff">
                            </td>
                        </tr>
                    </table>
                </div>
                <!--详细信息-->
                <div id="content5" class="content" style="display: none">
                    <table id="table5" runat="server" width="100%" border="0" align="center" cellpadding="0"
                        cellspacing="0">
                        <tr>
                            <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                                <asp:Label ID="lblContent" runat="server" Text="详细信息："></asp:Label>
                            </td>
                            <td bgcolor="#FFFFFF" align="left">
                                <ul>
                                    <li>
                                        <input class="button" onclick="OpenDialogPage();" type="button" value="选择图片" />
                                    </li>
                                    <!-- cc视频通代码 -->
                                    <li id="btn_CC" runat="server" visible="false">
                                        <object width='72' height='24'>
                                            <param name='wmode' value='transparent' />
                                            <param name='allowScriptAccess' value='always' />
                                            <param name='movie' value='http://union.bokecc.com/flash/plugin/plugin.swf?userID=<%=ccUID %>&type=normal' />
                                            <embed src='http://union.bokecc.com/flash/plugin/plugin.swf?userID=<%=ccUID %>&type=normal'
                                                type='application/x-shockwave-flash' width='72' height='24' allowscriptaccess='always'
                                                wmode='transparent'></embed>
                                        </object>
                                    </li>
                                </ul>
                                <br clear="all" />
                                <cc1:FCKeditor ID="txtContent" runat="server" Width="600px"></cc1:FCKeditor><span
                                    class="NeedMsg">*</span>&nbsp;
                            </td>
                        </tr>
                    </table>
                </div>
                <!--搜索优化-->
                <div id="content6" class="content" style="display: none">
                    <table id="table6" runat="server" width="100%" border="0" align="center" cellpadding="0"
                        cellspacing="0">
                        <tr>
                            <td width="20%" align="right" bgcolor="#FFFFFF" style="height: 30px">
                                <img class="notice-help" src="images/help.gif" title="页面标题" rel="此处的标题是做SEO搜索优化用。可以用更加详细、准确的词语来描述您的商品。为空时自动默认为商品名称。"/>
                                <asp:Label ID="lblSeoTitle" runat="server" Text="页面标题："></asp:Label>
                                &nbsp;
                            </td>
                            <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                                <asp:TextBox ID="txtSeoTitle" runat="server" Width="300px" MaxLength="150"></asp:TextBox><span
                                    class="NeedMsg"></span></td>
                        </tr>
                        <tr>
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <img class="notice-help" src="images/help.gif" title="关键字" rel="与商品相关的关键词，用于前台搜索引擎优化，多个关键词以中文，隔开。"/>
                                <asp:Label ID="lblSeoKeyWord" runat="server" Text="搜索关键字："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtSeoKeyWords" runat="server" TextMode="MultiLine" Height="80px"
                                    Width="300px"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="txtSeoKeyWords"
                                    ErrorMessage="长度必须在250以内" ValidationExpression=".{0,250}"></asp:RegularExpressionValidator></td>
                        </tr>
                        <tr>
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <img class="notice-help" src="images/help.gif" title="描述" rel="与商品相关的描述，用于前台搜索引擎优化。"/>
                                <asp:Label ID="lblSeoDescription" runat="server" Text="描述："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtSeoDescription" runat="server" TextMode="MultiLine" Height="80px"
                                    Width="300px"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" ControlToValidate="txtSeoDescription"
                                    ErrorMessage="长度必须在250以内" ValidationExpression=".{0,250}"></asp:RegularExpressionValidator></td>
                        </tr>
                    </table>
                </div>
                <!--商品配件-->
                <div id="content7" class="content" style="display: none">
                    <ajax:UpdatePanel ID="UpdatePanel3" runat="server">
                        <ContentTemplate>
                            <table id="table7" runat="server" width="100%" border="0" align="center" cellpadding="0"
                                cellspacing="0">
                                <tr>
                                    <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                        <asp:Label ID="lblSearchFitProduct" runat="server" Text="搜索商品："></asp:Label>
                                    </td>
                                    <td align="left" bgcolor="#ffffff">
                                        <asp:TextBox ID="txtSearchFitName" runat="server" Width="300px"></asp:TextBox>
                                        <asp:DropDownList ID="ddlCategoryIdFit" runat="server" Width="150px">
                                        </asp:DropDownList>
                                        <asp:Button ID="btnSearchFit" runat="server" CausesValidation="False" CssClass="button"
                                            OnClick="btnSearchFit_Click" Text="搜索" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                                        <img class="notice-help" src="images/help.gif" title="商品配件" rel="商品的附属品或附加品，可以和主商品同时购买。如果买手机，手机套、内存卡等均可作为手机的配件进行销售。"/>
                                        <asp:Label ID="lblFitting" runat="server" Text="商品配件："></asp:Label>
                                    </td>
                                    <td bgcolor="#FFFFFF" align="left">
                                        <table id="Table12" runat="server" width="100%" border="0" align="center" cellpadding="0"
                                            cellspacing="0">
                                            <tr>
                                                <td width="20%" align="left" bgcolor="#FFFFFF" style="height: 328px">
                                                    <asp:Label ID="lblNonFitting" runat="server" Text="待选商品"></asp:Label><br />
                                                    <asp:ListBox ID="lbNonFitting" runat="server" Height="300px" Width="250px" AutoPostBack="True"
                                                        OnSelectedIndexChanged="lbNonFitting_SelectedIndexChanged"></asp:ListBox><br />
                                                </td>
                                                <td bgcolor="#FFFFFF" align="center" style="width: 211px; height: 328px;">
                                                    <asp:Label ID="lblFittingTypeSelect" runat="server" Text="配件类型选择："></asp:Label><asp:DropDownList
                                                        ID="ddlFitType" runat="server">
                                                    </asp:DropDownList>&nbsp;<br />
                                                    <br />
                                                    <asp:Label ID="lblFittingPrice" runat="server" Text="配件价格："></asp:Label><asp:TextBox
                                                        ID="txtFittingPrice" runat="server" Width="50px"></asp:TextBox>
                                                        <span style="color: #ff0000">*</span>
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator15" runat="server"
                                            ControlToValidate="txtFittingPrice" Display="Dynamic" ErrorMessage="只能为数字,长度不能超过16位"
                                            ValidationExpression="^[\d]{0,16}([\.]+\d+){0,16}$"></asp:RegularExpressionValidator>
                                                        <br />
                                                    <br />
                                                    <asp:Label ID="lblDefault" runat="server" Text="是否默认："></asp:Label><asp:CheckBox
                                                        ID="cbDefault" runat="server" CssClass="checkboxaspx" Text="是" /><br />
                                                    <br />
                                                    <asp:Button ID="btnADDFitting" runat="server" CssClass="button"
                                                        OnClick="btnADDFitting_Click" Text="添加>>" />
                                                    <br />
                                                    <br />
                                                    <asp:Button ID="btnDelFitting" runat="server" CausesValidation="False" CssClass="button"
                                                        OnClick="btnDelFitting_Click" Text="<<移除" />
                                                    <br />
                                                    <br />
                                                    <asp:Label ID="lblFittingHelp" runat="server" Text="请选择配件类型" Visible="false" ForeColor="red"></asp:Label>
                                                </td>
                                                <td bgcolor="#FFFFFF" align="left" style="height: 328px">
                                                    <asp:Label ID="lblSelectedFitting" runat="server" Text="已选配件"></asp:Label><br />
                                                    <asp:ListBox ID="lbFitting" runat="server" Height="300px" Width="300px" SelectionMode="Multiple"
                                                        AutoPostBack="True" OnSelectedIndexChanged="lbFitting_SelectedIndexChanged"></asp:ListBox>
                                                    <br />
                                                    <asp:Label ID="lblShowInfo" runat="server" Visible="False" ForeColor="Red"></asp:Label></td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </ajax:UpdatePanel>
                    <ajax:UpdateProgress ID="UpdateProgress3" runat="server" AssociatedUpdatePanelID="UpdatePanel3" DisplayAfter="100">
                    <ProgressTemplate>
                    <div class="progress">正在加载，请稍候……</div>
                    </ProgressTemplate>
                    </ajax:UpdateProgress>                    
                </div>
                <!--相关商品-->
                <div id="content8" class="content" style="display: none">
                <ajax:UpdatePanel ID="UpdatePanel9" runat="server">
                        <ContentTemplate>
                            <table id="table8" runat="server" width="100%" border="0" align="center" cellpadding="0"
                                cellspacing="0">
                                <tr>
                                    <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                        <asp:Label ID="lblSearch" runat="server" Text="搜索商品："></asp:Label>
                                    </td>
                                    <td align="left" bgcolor="#ffffff">
                                        <asp:TextBox ID="txtSearchName" runat="server" Width="300px"></asp:TextBox>
                                        <asp:DropDownList ID="ddlCategoryID_R" runat="server" Width="150px">
                                        </asp:DropDownList>
                                        <asp:Button ID="btnSearchRP" runat="server" CausesValidation="False" CssClass="button"
                                            OnClick="btnSearchRP_Click" Text="搜索" />
                                    </td>
                                </tr>
                                <tr>
                                    <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                                        <asp:Label ID="lblRelatedProduct" runat="server" Text="相关商品："></asp:Label>
                                    </td>
                                    <td bgcolor="#FFFFFF" align="left">
                                        <table runat="server" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td width="20%" height="30" align="left" bgcolor="#FFFFFF">
                                                    <asp:Label ID="lblNonRelateProduct" runat="server" Text="待关联商品"></asp:Label><br />
                                                    <asp:ListBox ID="lbNonRelatedProduct" runat="server" Height="200px" SelectionMode="Multiple"
                                                        Width="250px"></asp:ListBox>
                                                </td>
                                                <td bgcolor="#FFFFFF" align="center" style="width: 113px">
                                                    <asp:RadioButtonList ID="rblRelatedType" runat="server" CssClass="radioaspx">
                                                        <asp:ListItem Value="0">单向关联</asp:ListItem>
                                                        <asp:ListItem Value="1" Selected="True">双向关联</asp:ListItem>
                                                    </asp:RadioButtonList>
                                                    <br />
                                                    <asp:Button ID="btnADDRelatedProduct" runat="server" CausesValidation="False" CssClass="button"
                                                        OnClick="btnADDRelatedProduct_Click" Text="添加>>" />
                                                    <br />
                                                    <br />
                                                    <asp:Button ID="btnDelRelatedProduct" runat="server" CausesValidation="False" CssClass="button"
                                                        OnClick="btnDelRelatedProduct_Click" Text="<<移除" /></td>
                                                <td bgcolor="#FFFFFF" align="left">
                                                    <asp:Label ID="lblSelectedProduct" runat="server" Text="已关联商品"></asp:Label><br />
                                                    <asp:ListBox ID="lbRelatedProduct" runat="server" Height="200px" Width="300px" SelectionMode="Multiple">
                                                    </asp:ListBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </ajax:UpdatePanel>
                    <ajax:UpdateProgress ID="UpdateProgress9" runat="server" AssociatedUpdatePanelID="UpdatePanel9" DisplayAfter="100">
                    <ProgressTemplate>
                    <div class="progress">正在加载，请稍候……</div>
                    </ProgressTemplate>
                    </ajax:UpdateProgress>                     
                </div>
                <!--相关文章-->
                <div id="content9" class="content" style="display: none">
                <ajax:UpdatePanel ID="UpdatePanel10" runat="server">
                        <ContentTemplate>
                    <table id="table9" runat="server" width="100%" border="0" align="center" cellpadding="0"
                        cellspacing="0">
                        <tr>
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <asp:Label ID="lblSearchTitle" runat="server" Text="搜索文章："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:TextBox ID="txtSearchTitle" runat="server" Width="300px"></asp:TextBox>
                                <asp:DropDownList ID="ddlArticleCategoryID" runat="server" Width="150px">
                                </asp:DropDownList>
                                <asp:Button ID="btnSearchRA" runat="server" CausesValidation="False" CssClass="button"
                                    OnClick="btnSearchRA_Click" Text="搜索" />
                            </td>
                        </tr>
                        <tr>
                            <td width="20%" align="right" bgcolor="#FFFFFF" style="height: 228px">
                                <asp:Label ID="lblRelatedArticle" runat="server" Text="相关文章："></asp:Label>
                            </td>
                            <td bgcolor="#FFFFFF" align="left" style="height: 228px">
                                <table runat="server" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td width="20%" align="left" bgcolor="#FFFFFF" style="height: 214px">
                                            <asp:Label ID="lblNonRelatedArticle" runat="server" Text="待关联文章"></asp:Label><br />
                                            <asp:ListBox ID="lbNonRelatedArticle" runat="server" Height="200px" SelectionMode="Multiple"
                                                Width="250px"></asp:ListBox>
                                        </td>
                                        <td bgcolor="#FFFFFF" align="center" style="width: 113px; height: 214px;">
                                            &nbsp;<br />
                                            <asp:Button ID="btnADDRealtedArticle" runat="server" CausesValidation="False" CssClass="button"
                                                Text="添加>>" OnClick="btnADDRealtedArticle_Click" />
                                            <br />
                                            <br />
                                            <asp:Button ID="btnDelRealtedArticle" runat="server" CausesValidation="False" CssClass="button"
                                                Text="<<移除" OnClick="btnDelRealtedArticle_Click" />
                                        </td>
                                        <td bgcolor="#FFFFFF" align="left" style="height: 214px">
                                            <asp:Label ID="lblSelectedArticle" runat="server" Text="已关联文章"></asp:Label><br />
                                            <asp:ListBox ID="lbRelatedArticle" runat="server" Height="200px" Width="300px" SelectionMode="Multiple">
                                            </asp:ListBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                    </ContentTemplate>
                    </ajax:UpdatePanel>
                    <ajax:UpdateProgress ID="UpdateProgress10" runat="server" AssociatedUpdatePanelID="UpdatePanel10" DisplayAfter="100">
                    <ProgressTemplate>
                    <div class="progress">正在加载，请稍候……</div>
                    </ProgressTemplate>
                    </ajax:UpdateProgress>                     
                </div>
                <!--扩展分类-->
                <div id="content10" class="content" style="display: none">
                    <ajax:UpdatePanel ID="UpdatePanel7" runat="server">
                        <ContentTemplate>
                            <table id="table10" runat="server" width="100%" border="0" align="center" cellpadding="0"
                                cellspacing="0">
                                <tr>
                                    <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                                        <img class="notice-help" src="images/help.gif" title="扩展分类" rel="添加了扩展分类，代表在分类下可以查到该商品，一个商品可以从属于多个分类。注意只能选择最后一级分类，非最后一级分类选择将无效，不会被添加。"/>
                                        <asp:Label ID="lblExtendCategory" runat="server" Text="扩展分类："></asp:Label>
                                    </td>
                                    <td bgcolor="#FFFFFF" align="left">
                                        <table id="Table11" runat="server" width="100%" border="0" align="center" cellpadding="0"
                                            cellspacing="0">
                                            <tr>
                                                <td width="20%" height="30" align="left" bgcolor="#FFFFFF">
                                                    <asp:Label ID="lblNonExtendCateory" runat="server" Text="待选分类"></asp:Label><br />
                                                    <asp:ListBox ID="lbNonExtendCategory" runat="server" Height="200px" SelectionMode="Multiple"
                                                        Width="250px"></asp:ListBox>
                                                </td>
                                                <td bgcolor="#FFFFFF" align="center" style="width: 113px">
                                                    <asp:Button ID="btnADDExtendCategory" runat="server" CausesValidation="False" CssClass="button"
                                                        Text="添加>>" OnClick="btnADDExtendCategory_Click" />
                                                    <br />
                                                    <br />
                                                    <asp:Button ID="btnDelExtendCategory" runat="server" CausesValidation="False" CssClass="button"
                                                        Text="<<移除" OnClick="btnDelExtendCategory_Click" />
                                                </td>
                                                <td bgcolor="#FFFFFF" align="left">
                                                    <asp:Label ID="lblSelectExtendCategory" runat="server" Text="已选分类"></asp:Label><br />
                                                    <asp:ListBox ID="lbExtendCategory" runat="server" Height="200px" Width="300px" SelectionMode="Multiple">
                                                    </asp:ListBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                    </ajax:UpdatePanel>
                    <ajax:UpdateProgress ID="UpdateProgress7" runat="server" AssociatedUpdatePanelID="UpdatePanel7" DisplayAfter="100">
                    <ProgressTemplate>
                    <div class="progress">正在加载，请稍候……</div>
                    </ProgressTemplate>
                    </ajax:UpdateProgress>                     
                </div>
                <!--商品规格-->
                <div id="content11" class="content" style="display: none">
                    <div id="openspec-notice" style="padding: 2px 0 6px 20%;display:none;">注：开启规格后，商品市场价和商城价仅用来展示。</div>
                    <table id="table13" width="100%" border="0" align="center" cellpadding="0"
                        cellspacing="0">
                        <tr id="trMemberPrice" runat="server">
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <img class="notice-help" src="images/help.gif" title="自动计算等级会员价格" rel="选择此项，会员价格自动按等级折扣*商城价格。注意：等级价格是商城价为计算基础的。反之，则手动输入会员价格。"/>
                                <asp:Label ID="lblAutoComputerMemPrice" runat="server" Text="自动计算等级会员价格："></asp:Label></td>
                            <td align="left" bgcolor="#ffffff">
                                <asp:CheckBox ID="cbAutoComputerMemPrice" runat="server" CssClass="checkboxaspx" Text="是" Checked="True" onclick="chk_price(this)"/></td>
                        </tr>
                        <tr id="trAutoComputerMemPrice" runat="server" style="display:none;">
                            <td align="right" bgcolor="#ffffff" height="30" width="20%">
                                <asp:Label ID="lblMembelLevelPrice" runat="server" Text="会员等级价格："></asp:Label>
                            </td>
                            <td align="left" bgcolor="#ffffff">
                                <div class="listborder">
                                    <div>
                                        <cc1:V5ShopGridView ID="GridViewUserGroup" runat="server" PagerSettings-Visible="false"
                                            AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" BorderWidth="0px"
                                            CacheName="UserGroup" CssClass="datalist" GridLines="None" Height="100px" PageSize="15"
                                            TableName="UserGroup" Width="370px">
                                            <PagerSettings Mode="NumericFirstLast" Visible="False" />
                                            <Columns>
                                                <asp:BoundField DataField="ID" HeaderText="ID" />
                                                <asp:boundfield datafield="Name" headertext="等级名称" />
                                                <asp:boundfield datafield="MinScore" headertext="积分下限" />
                                                <asp:boundfield datafield="Discount" headertext="等级折扣" />
                                                <asp:templatefield headertext="等级价格">
                                                    <itemstyle width="50px" />
                                                    <itemtemplate>
											<asp:TextBox id="MemberLevelPrice" runat="server" Text='<%# Bind("Price") %>' Width="60px"></asp:TextBox> 
									</itemtemplate>
                                                </asp:templatefield>
                                            </Columns>
                                            <HeaderStyle CssClass="category" />
                                        </cc1:V5ShopGridView>
                                        <br />
                                        <input id="btnAutoCount" type="button" value="计算等级会员价格" onclick="autoPrice();" class="button"/>
                                    </div>
                                </div>
                            </td>
                        </tr>                        
                        <tr>
                            <td width="20%" align="right" bgcolor="#FFFFFF" style="height: 30px">
                                规格：&nbsp;
                            </td>
                            <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                                <input id="specBtn" type="button" value="开启规格" class="button" runat="server"/>
                                
                                <font color="red">（您在开启规格后可以在下方选择该商品包含的具体规格值）</font>
                            </td>
                        </tr>
                        <asp:Literal runat="server" ID="ltlEditSpecs"></asp:Literal></table> 
                    <div id="loading" style="padding-left:20%;display:none;"><div style="border:solid 1px gray;line-height:22px; margin-left:5px; width:600px;">loading</div></div>
                    <div id="spec-table" style="padding-left:20%;"><asp:Literal runat="server" ID="ltlSpecsProduct"></asp:Literal></div>
                </div>
                <table id="table0" runat="server" width="100%" border="0" align="center" cellpadding="0"
                    cellspacing="0">
                    <tr>
                        <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                        </td>
                        <td bgcolor="#FFFFFF" align="left">
                            <asp:Button ID="btnAdd" runat="server" Text="确定" CssClass="button" OnClick="btnAdd_Click"/>
                            <asp:Button ID="btnEdit" runat="server" Text="更新" CssClass="button" OnClick="btnEdit_Click"
                                Visible="False" />
                            <input id="btnReset" runat="server" type="reset" class="button" value="重置" />
                            <input id="TabId" name="TabID" type="hidden" class="button" value="1" />
                            <input id="btnReturn" runat="server" type="button" value="返回列表" onclick="window.location.href='Product_Product_Manage.aspx'"
                                class="button" /></td>
                    </tr>
                </table>
            </div>
        </asp:Panel>
        <!--BUG：因为在编辑分类时隐藏了fck控件，所以通过此Hidden传值-->
        <asp:HiddenField ID="FckHidden" runat="server" />
        <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
        <asp:HiddenField ID="PageIndex" runat="server" Value="0" />
        <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0" />
        <uc1:HiddenField ID="Alert" runat="server" />        
        <div style="margin-top: 44px; clear: both;">
            <uc1:PageBottom ID="PageBottom1" runat="server" Visible="true" />
        </div>
        <script type="text/javascript">
        //重写加载样式的方法
        function InitTrClassById(id){
            var flag = 0;
            var node = childs(document.getElementById(id).childNodes)[0].childNodes;
            for(var i=0;i<node.length;i++){
                if(node[i].tagName == "TR" && node[i].style.display != "none" && $(node[i]).get("class").length==0){
                    if(flag == 0)
                        node[i].className = "F7tr";
                    else
                        node[i].className = "FFtr";
                    
                    flag = 1 - flag;
                }
            }
        }
        
        try{
            InitTrClassById("table1");
            InitTrClassById("table13");
            var i;
            for(i=1;i<=10;i++)
            {
                InitTrClassById("table"+i);
            }
        }catch(e){}
        
        <%=jsstr%>
        function IsDefault(strDefault)
        {
            var i=0;
            var radion= document.getElementsByName("RadionID");
            try{
                    for(i=0;i<radion.length;i++)
                    {
                        if(radion[i].value==strDefault)
                        {
                            radion[i].checked=true;
                        }
                    }
                    if(strDefault=="" && radion.length>=0)
                    {
                        radion[0].checked=true;
                    }
            }
            catch(e)
            {
            
            }
        }
        <%=DefaultStr%>
        
        //初始化标签样式
        function initTag()
        {
            if($("TagPanel")){
                $("TagPanel").getChildren().each(function(v,i){
                    if($("txtTags").value.indexOf(v.value)!=-1)
                    {
                        v.style.color="#CCCCCC";
                    }
                });   
            }                          
        }
       
        initTag();       
           
        //初始化页面脚本
        var picEdit = new picEditor();
        window.addEvent("domready",function() {
            if(!$("CategorySubmit")){
                new Swiff.Uploader( { 
                    verbose: true,
                    url:'<%= adminPath %>/Product_Operate_Ajax.aspx?act=uploadPic',
                    path: '<%= adminPath %>/images/product/uploader.swf',
                    typeFilter: {
                        'Images (*.jpg, *.jpeg, *.gif, *.png)': '*.jpg; *.jpeg; *.gif; *.png'
                    },
                    fileSizeMax:10485760,
                    target:'fix_fl10upload_panel',
                    onSelectFail:function(rs){
                        rs.each(function(v){
	                        if(v.validationError=='sizeLimitMax'){
		                        alert(v.name+'\n\n文件超出大小');
	                        };
                        });			
                    },
                    onSelectSuccess:function(rs){
                        var PID='up_';
                        var _this=this;
                        rs.each(function(v,i){
	                         new Element('div',{'class':'gpic-box','id':PID+v.id}).inject($('all-pics'));
                        });
                        this.start();		
                    },
                    onFileOpen:function(e){
                        $('up_'+e.id).setHTML('<span><em style="font-size:13px;font-family:Georgia;">0%</em></span>',
                                            '<div class="picdelete"><div class="progress-bar" style="width:45px"><i>&nbsp;</i></div></div>');
                    },
                    onFileProgress:function(e){
                        var pt=Number(e.progress.bytesLoaded*100/e.size).toFixed()+'%';  
                        $('up_'+e.id).getElement('i').setStyle('width',pt);
                        $('up_'+e.id).getElement('em').set('text',pt);
                    },		
                    onFileComplete: function(res){		
                        if(res.response.error){
	                        return  new MessageBox('文件'+res.name+'上传失败',{type:'error',autohide:true});
                        }
                        $('up_'+res.id).setHTML(res.response.text);
                        if(!$('x-main-pic').retrieve('cururl')){
                          $E('#all-pics .gpic-box span').onclick();
                        }
                    }
                });
                
                $E(".btn-span").addEvent("click",function(){
                    if (!Browser.Engine.trident){
                        window.open('Picture_Select_Dialog.aspx?d=' + Date(),'newWin','modal=yes,width=620,height=620,top=200,left=300,resizable=no,scrollbars=no');
                    }else{
                        var GetValue = showModalDialog('Picture_Select_Dialog.aspx?d=' + Date(),'','dialogWidth:620px;dialogHeight:620px;')
                        if (GetValue != null) {
                            InsertMultiPic(GetValue);
                        } 
                    }        
                }); 
                           
            }	
        });
        
        function InsertMultiPic(str){
            str.split("$$").each(function(v,i){
                if(v.length){
                    var id = v.split("||")[0];
                    var src = v.split("||")[1];
                    var small = src.toLowerCase().replace(".jpg", "_tmp.jpg").replace(".gif", "_tmp.gif").replace(".png", "_tmp.png")
                    if(!$E("input[value='"+id+"']","all-pics")){
                        var el = new Element('div',{'class':'gpic-box'}).inject($('all-pics'));
                        el.setHTML("<span  onclick=\"picEdit.setDefault('"+id+"','"+src+"')\"><img sn='_img_"+id+"' src='images/product/loading.gif' lsrc='"+src+"' onload='Product.imgLoader(this);'></span><input name=\"image_file\" value='"+id+"' type='hidden'><div class='gpic-btn-bar'><span class='gpic-btn-view' onClick=\"picEdit.viewSource({source:'"+src+"',small:'"+small+"'})\" title='查看路径'><i>查看路径</i></span>|<span class='gpic-btn-delete' onClick='picEdit.del("+id+",this)' title='删除图片'><i>删除图片</i></span></div>");
                        if(!$('x-main-pic').retrieve('cururl')){
                          $E('#all-pics .gpic-box span').onclick();
                        }
                    }          
                }
            });
        }
             
        <% if(!hasTrue){ %>
            //为按钮绑定事件
            if($("specBtn")) $("specBtn").addEvent("click",Product.openSpec);        
        <% }else{%>
            //编辑时为关闭规格按钮绑定click事件
            if($("specBtn")){
                Product.bindCloseEvent();
                Product.bindToggleEvent();
                Product.bindItemEvent();
                Product.bindDialogEvent();
                Product.bindSynEvent();
            }
        <% }%>
        
        //为确定和更新按钮绑定验证事件
        $$("#btnAdd,#btnEdit").addEvent("click",Product.checkUnique);
        
        //初始化单选按钮状态
        <%if(id=="0"){ %>
            $ES("#rblIsAlert input,#rblIsVirtual input,#rblIsChangedBuy input,#rblIsChanged input,#rblIsPresent input","table1").each(function(v,i){
                if(v.value=="0") v.checked=true;
            });
        <% }%>
        
        //初始化帮助tips
        window.addEvent('load', function() {
            new Tips(".notice-help",{
	            showDelay: 0,
	            hideDelay: 0,
	            offsets:{x:12,y:12}
            })
        });
        </script>        
    </form>
</body>
</html>
