<%@ Page Language="C#" AutoEventWireup="false" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Controls" Assembly="Hishop.Web.Controls" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Management" Assembly="Hishop.Web.Management" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Validator" Assembly="Hishop.Web.Validator" %>
<%@ Register TagPrefix="Kindeditor" Namespace="kindeditor.Net" Assembly="kindeditor.Net" %>
<%@ Register TagPrefix="UI" Namespace="ASPNET.WebControls" Assembly="ASPNET.WebControls" %>
<%@ Import Namespace="Hishop.SystemServices" %>

<!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 id="Head1" runat="server">
    <Hishop:HeadContainer ID="HeadContainer1" runat="server" />
    <Hishop:PageTitle ID="PageTitle1" runat="server" />
    <link rel="stylesheet" href="../css/Hishopv5.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="../../utility/validate/pagevalidator.css" type="text/css" media="screen" />
    <script type="text/javascript" src="../../utility/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../../utility/validate/pagevalidator.js"></script>
    <script type="text/javascript" src="../js/Hishopv5.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="PageTitleArea">
            <div class="PageTitle">
                <asp:Literal ID="litManagerTop" runat="server" Text="<%$ Resources:EditProduct, IDS_PageTitle %>" ></asp:Literal>
            </div>
            <div style="width: 80%;">
                <asp:Literal ID="litManagerDisciption" runat="server" Text="<%$ Resources:EditProduct, IDS_PageDesc %>" ></asp:Literal>
            </div>
        </div>
        
        <Hishop:EditProduct runat="server" ID="EditProduct">
        <SkinTemplate>
            <Hishop:StatusMessage id="Status" runat="server" Visible="False" />
             <UI:TabStrip runat="server" ID="tabs" Width="100%">
    <Tabs>
    <UI:TabStripTab ID="tabBaseInfo" runat="server" Title="<%$ Resources:ProductView, IDS_FormField_lblContent %>">            
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td style="width:75%;">
                <table style="width: 100%" cellspacing="0" cellpadding="0" class="formTableList">
                    <tr>
                        <!-- 商品分类 -->
                        <td class="leftTD" style="width:130px">
                            <asp:Literal ID="litCategory" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Category %>" ></asp:Literal>：</td>
                        <td class="rightTD" style="width:200px">
                           <Hishop:ProductCategoriesDropDownList runat="server" onchange="CategoryChanged(this.value);" ID="dropCategories" /></td>
                        <td class="rightTD">
                            <div id="dropCategoriesTip" runat="server" style="width:200px"></div>
                            <Hishop:ValidateTarget ID="ValidateTargetCategories" runat="server" ContainerId="ValidatorContainer"
                                Description="<%$ Resources:ProductView, IDS_FormField_CategoryHelp %>"
                                ControlToValidate="dropCategories">
                                <Validators>
                                    <Hishop:DropDownListClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_CategoryHelp %>" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                        </tr>
                    <tr>
                        <!-- 类型 -->
                        <td class="leftTD" style="width:130px"">
                            <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_ProductType %>" ></asp:Literal>：</td>
                        <td class="rightTD" style="width:200px">
                            <Hishop:ProductTypeDownList runat="server" onchange="ProductTypeChanged(this.value);" ID="dropProductTypes" /></td>
                        <td class="rightTD">
                            <label class="msgNormal" style="width:200px"><asp:Literal ID="Literal32" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_ProductTypeHelp %>" /></label>
                        </td>
                    </tr>
                    <tr>
                        <td class="leftTD" style="width:130px"">
                            <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_BrandCategory %>" ></asp:Literal>：</td>
                        <td class="rightTD" style="width:200px">
                            <Hishop:BrandCategoriesDropDownList runat="server" ID="dropBrandCategories" /></td>
                        <td class="rightTD">
                            <label class="msgNormal" style="width:200px">
                                <asp:Literal ID="Literal42" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_BrandCategoryHelp %>" /></label>
                        </td>
                    </tr>
                    <tr>
                        <!-- 排序 -->
                        <td class="leftTD" style="width:130px"">
                            <asp:Literal ID="Literal24" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Sequence %>" ></asp:Literal>：</td>
                        <td class="rightTD" style="width:200px">
                            <asp:TextBox CssClass="NumberText" runat="server" ID="txtDisplaySequence" /></td>
                        <td class="rightTD">
                            <div id="txtDisplaySequenceTip" runat="server" style="width:200px"></div>
                            <Hishop:ValidateTarget ID="ValidateTarget2" runat="server" ControlToValidate="txtDisplaySequence" ContainerId="ValidatorContainer"
                                Nullable="false" Description="<%$ Resources:ProductView, IDS_FormField_SequenceHelp %>">
                                <Validators>
                                    <Hishop:InputNumberClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMember %>" />
                                    <Hishop:NumberRangeClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMinMax %>"  MinValue="1" MaxValue="9999999" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                    </tr>

                    <tr>
                        <!-- 商品名称 -->
                        <td class="leftTD" style="width:130px"">
                            <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_ProductName %>" ></asp:Literal>：</td>
                        <td class="rightTD" style="width:200px">
                            <asp:TextBox CssClass="SingleText" runat="server" ID="txtProductName" Width="195px" /></td>
                        <td class="rightTD">
                            <div id="txtProductNameTip" runat="server" style="width:200px"></div>
                            <Hishop:ValidateTarget ID="ValidateTarget3" runat="server" ControlToValidate="txtProductName" ContainerId="ValidatorContainer"
                                Nullable="false" Description="<%$ Resources:ProductView, IDS_ErrorMessage_ProductNameRequired %>">
                                <Validators>
                                    <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_StringLenth100 %>" LowerBound="1" UpperBound="100" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                    </tr>

                    <tr>
                        <td class="leftTD" style="width:130px"">
                            <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_SKU %>" ></asp:Literal>：</td>
                        <td class="rightTD" style="width:200px">
                            <asp:TextBox CssClass="SingleText" runat="server" ID="txtSKU" /></td>
                        <td class="rightTD">
                            <div id="txtSKUTip" runat="server" style="width:200px"></div>
                            <Hishop:ValidateTarget ID="ValidateTarget4" runat="server" ControlToValidate="txtSKU" ContainerId="ValidatorContainer"
                                Nullable="false" Description="<%$ Resources:ProductView, IDS_FormField_SKUMessage %>">
                                <Validators>
                                    <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_StringLenth20 %>" LowerBound="1" UpperBound="20" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                    </tr>
                    

                    <tr>
                        <td class="leftTD" style="width:130px"">
                            <asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Supplier %>" ></asp:Literal>：</td>
                        <td class="rightTD" style="width:200px">
                            <Hishop:SupplierDropDownList runat="server" ID="dropSuppliers" /></td>
                        <td class="rightTD">
                            <label class="msgNormal" style="width:200px">
                                <asp:Literal ID="Literal52" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_SupplierHelp %>" /></label>
                        </td>
                    </tr>

                    <tr>
                        <td class="leftTD" style="width:130px"">
                            <asp:Literal ID="Literal8" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Unit %>" ></asp:Literal>： </td>
                        <td class="rightTD" style="width:200px">
                            <asp:TextBox CssClass="NumberText" runat="server" ID="txtUnit" /></td>
                        <td class="rightTD">
                            <div id="txtUnitTip" runat="server" style="width:200px"></div>
                            <Hishop:ValidateTarget ID="ValidateTarget5" runat="server" ControlToValidate="txtUnit" ContainerId="ValidatorContainer"
                                Nullable="true" Description="<%$ Resources:ProductView, IDS_FormField_UnitHelp %>">
                                <Validators>
                                    <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_StringLenth10 %>" LowerBound="1" UpperBound="10" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                    </tr>

                    <tr>
                        <td class="leftTD" style="width:130px">
                            <asp:Literal ID="Literal15" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Weight %>" ></asp:Literal>：</td>
                        <td class="rightTD" style="width:200px">
                            <asp:TextBox CssClass="NumberText" runat="server" ID="txtWeight" />
                            <span class="RequiredFieldTag">(<asp:Literal ID="lblKe" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_lblKe %>"></asp:Literal>)</span>
                        </td>
                        <td class="rightTD">
                            <div id="txtWeightTip" runat="server" style="width:200px"></div>
                            <Hishop:ValidateTarget ID="ValidateTarget6" runat="server" ControlToValidate="txtWeight" ContainerId="ValidatorContainer"
                                Nullable="true" Description="<%$ Resources:ProductView, IDS_FormField_WeightHelp %>">
                                <Validators>
                                    <Hishop:InputNumberClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMember %>" />
                                    <Hishop:NumberRangeClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMinMax %>"  MinValue="0" MaxValue="9999999" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                    </tr>

                    <tr>
                        <td class="leftTD" style="width:130px">
                            <asp:Literal ID="Literal16" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Upselling %>" ></asp:Literal>：</td>
                        <td class="rightTD" style="width:200px">
                            <UI:YesNoRadioButtonList ID="radlPublishOptions" runat="server" RepeatDirection="Horizontal" /></td>
                        <td class="rightTD">
                            <label class="msgNormal" style="width:200px">
                                <asp:Literal ID="Literal33" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_UpsellingHelp %>" /></label>
                        </td>
                    </tr>
                    <tr>
                        <td class="leftTD" style="width:130px">
                            <asp:Literal ID="Literal17" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_SaleOptions %>" ></asp:Literal>：</td>
                        <td class="rightTD" style="width:200px">
			                <Hishop:SaleOptionCheckBoxList RepeatDirection="Horizontal" runat="server" ID="chklSaleOptions" /></td>
                        <td class="rightTD">
                            <label class="msgNormal" style="width:200px">
                                <asp:Literal ID="Literal34" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_SaleOptionsHelp %>" /></label>
                        </td>
                    </tr>
                </table>
                <!--商品属性选择-->
                <UI:CallBack id="cbAttributes" CacheContent="false" PostState="true" runat="server">
                    <Content>
                        <Hishop:AttributeTable runat="server" ID="tblAttributes" TableStyle="width: 100%" CssClass="formTableList" TitleCellCssClass="leftTD" TitleCellStyle="width:130px;" ValueCellCssClass="rightTD" />
                    </Content>
                </UI:CallBack>
                <table style="width: 100%" cellspacing="0" cellpadding="0" class="formTableList">           
                    <tr>
                        <td class="leftTD" style="width:130px">
                            <asp:Literal ID="Literal18" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_CostPrice %>" ></asp:Literal>：</td>
                        <td class="rightTD" style="width:200px">
			            <asp:TextBox CssClass="NumberText" runat="server" ID="txtCostPrice" /></td>
                        <td class="rightTD">
                            <div id="txtCostPriceTip" runat="server" style="width:200px"> </div>
                            <Hishop:ValidateTarget ID="ValidateTargetCharge" runat="server" ContainerId="ValidatorContainer" Nullable="true"
                                ControlToValidate="txtCostPrice" Description="<%$ Resources:ProductView, IDS_FormField_CostPriceHelp %>">
                                <Validators>
                                    <Hishop:InputMoneyClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMember %>" />
                                    <Hishop:MoneyRangeClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMinMax %>" MaxValue="9999999" MinValue="0" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                    </tr>
                    <tr>
                        <td class="leftTD" style="width:130px">
                            <asp:Literal ID="Literal19" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_MarketPrice %>" ></asp:Literal>：</td>
                        <td class="rightTD" style="width:200px">
			            <asp:TextBox CssClass="NumberText" runat="server" ID="txtMarketPrice" /></td>
                        <td class="rightTD">
                            <div id="txtMarketPriceTip" runat="server" style="width:200px"> </div>
                            <Hishop:ValidateTarget ID="ValidateTarget7" runat="server" ContainerId="ValidatorContainer" Nullable="true"
                                ControlToValidate="txtMarketPrice"  Description="<%$ Resources:ProductView, IDS_FormField_MarketPriceHelp %>">
                                <Validators>
                                    <Hishop:InputMoneyClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMember %>" />
                                    <Hishop:MoneyRangeClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMinMax %>" MaxValue="9999999" MinValue="0" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                    </tr>

                    <tr>
                        <td class="leftTD" style="width:130px">
                            <asp:Literal ID="Literal20" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_CommonPrice %>" ></asp:Literal>：</td>
                        <td class="rightTD">
			            <asp:TextBox CssClass="NumberText" runat="server" ID="txtSalePrice" /></td>
                        <td class="rightTD">
                            <div id="txtSalePriceTip" runat="server" style="width:200px"> </div>
                            <Hishop:ValidateTarget ID="ValidateTarget8" runat="server" ContainerId="ValidatorContainer" Nullable="false"
                                ControlToValidate="txtSalePrice"  Description="<%$ Resources:ProductView, IDS_FormField_CommonPriceHelp %>">
                                <Validators>
                                    <Hishop:InputMoneyClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMember %>" />
                                    <Hishop:MoneyRangeClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMinMax %>" MinValue="0" MaxValue="9999999" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                    </tr>

                    <tr>
                        <td class="leftTD" style="width:130px">
                            <asp:Literal ID="Literal21" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Stock %>" ></asp:Literal>：</td>
                        <td class="rightTD">
			            <asp:TextBox runat="server" CssClass="NumberText" ID="txtStock" /></td>
                        <td class="rightTD">
                            <div id="txtStockTip" runat="server" style="width:200px"></div>
                            <Hishop:ValidateTarget ID="ValidateTarget9" runat="server" ControlToValidate="txtStock" ContainerId="ValidatorContainer"
                                Nullable="true" Description="<%$ Resources:ProductView, IDS_FormField_StockHelp %>">
                                <Validators>
                                    <Hishop:InputNumberClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMember %>" />
                                    <Hishop:NumberRangeClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMinMax %>"  MinValue="0" MaxValue="9999999" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                    </tr>

                    <tr>
                        <td class="leftTD" style="width:130px">
                            <asp:Literal ID="Literal22" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_QuantityLimit %>" ></asp:Literal>：</td>
                        <td class="rightTD">
			            <asp:TextBox runat="server" CssClass="NumberText" ID="txtQuantityLimit" /></td>
                        <td class="rightTD">
                            <div id="txtQuantityLimitTip" runat="server" style="width:200px"></div>
                            <Hishop:ValidateTarget ID="ValidateTarget10" runat="server" ControlToValidate="txtQuantityLimit" ContainerId="ValidatorContainer"
                                Nullable="true" Description="<%$ Resources:ProductView, IDS_FormField_QuantityLimitHelp %>">
                                <Validators>
                                    <Hishop:InputNumberClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMember %>" />
                                    <Hishop:NumberRangeClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMinMax %>"  MinValue="1" MaxValue="9999999" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                    </tr>

                    <tr>
                        <td class="leftTD" style="width:130px">
                            <asp:Literal ID="Literal23" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Quantity %>" ></asp:Literal>：</td>
                        <td class="rightTD">
			            <asp:TextBox runat="server" CssClass="NumberText" ID="txtMinQuantity" /></td>
                        <td class="rightTD">
                            <div id="txtMinQuantityTip" runat="server" style="width:200px"></div>
                            <Hishop:ValidateTarget ID="ValidateTarget11" runat="server" ControlToValidate="txtMinQuantity" ContainerId="ValidatorContainer"
                                Nullable="true" Description="<%$ Resources:ProductView, IDS_FormField_QuantityHelp %>">
                                <Validators>
                                    <Hishop:InputNumberClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMember %>" />
                                    <Hishop:NumberRangeClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MustMinMax %>"  MinValue="1" MaxValue="9999999" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                    </tr>


                    <tr>
                        <td style="height:1px;background-color:#ddd;overflow:hidden;"></td>
                        <td style="height:1px;background-color:#ddd;overflow:hidden;" colspan="2"></td>
                    </tr>
                </table>
            </td>
            <td style="width:25%;" valign="top" align="center">
	            <UI:CallBack id="cbUpload" CacheContent="false" PostState="true" runat="server">
                    <Content>
                        <UI:ImageUpload 
                        ID="uploader" PreviewBoxStyle="width:180px;height:180px;border:solid 2px #999999;text-align:center;vertical-align:baseline;padding:10px 10px 10px 10px" 
                        runat="server" PostUrl="admin/upload.aspx" PreviewBoxWidth="170px"  PreviewBoxHeight="170px"
                         ListItemHeight="40px" ListItemWidth="40px"
                        ListItemStyle="width:45px;height:45px;border:solid 1px #EEEEEE;text-align:center;vertical-align:baseline;padding:5px 5px 5px 5px"
                        />
                    </Content>
                </UI:CallBack>
                <div style="width:180px;text-align:center;padding-top:5px;">
                    <a href="javascript:void(0);" style="background-image:url(../images/btn_upload.gif);background-repeat: no-repeat; background-position:left top;text-align:center;" class="files" id="fileContents"></a>
                    <img id="uploadProcess" style="display: none;" src="../images/loading.gif" />
                </div>
	          </td>
          </tr>
        </table>
    </UI:TabStripTab>
    <UI:TabStripTab ID="tabSKU" runat="server" Title="<%$ Resources:ProductView, IDS_FormField_SKUs %>">    		
		    <table style="width: 100%" cellspacing="0" cellpadding="0" class="formTableList">
		        <tr>
                        <td class="leftTD" style="width:130px;">
                            <asp:Literal ID="Literal25" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_ProductSKUs %>" ></asp:Literal>：
                        </td>
                        <td class="rightTD">
                            <UI:CallBack id="cbSkus"  CacheContent="false" PostState="true" Debug="false" runat="server">
                                <Content>
                                    <Hishop:SKUTable runat="server" EnableButtonStyle="color:Blue" AddButtonStyle="color:Blue" CloseButtonStyle="color:Blue" OnClientAddClick="OpenAddSKUField();" ID="tblSkus" />
                                </Content>
                            </UI:CallBack>
                        </td>
                    </tr>
            </table>
    </UI:TabStripTab>		
    <UI:TabStripTab ID="tabDes" runat="server" Title="<%$ Resources:ProductView, IDS_FormField_ProductDec %>">        		
		    <table style="width: 100%" cellspacing="0" cellpadding="0" class="formTableList">
                <tr>
                        <td class="leftTD" style="width:130px;">
                            <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Description %>" />：
                        </td>
                        <td class="rightTD">
                            <asp:TextBox runat="server" ID="txtDescription" TextMode="MultiLine" Width="280px"
                                Height="100" />
                        </td>
                        <td class="rightTD">
                            <div id="txtDescriptionTip" runat="server">
                            </div>
                            <Hishop:ValidateTarget ID="ValidateTargetDescription" ContainerId="ValidatorContainer"
                                runat="server" Nullable="true" ControlToValidate="txtDescription" Description="<%$ Resources:ProductView, IDS_FormField_DescriptionHelp %>">
                                <Validators>
                                    <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:ProductView, IDS_FormField_DescriptionHelp %>"
                                        UpperBound="1000" />
                                </Validators>
                            </Hishop:ValidateTarget>
                        </td>
                    </tr>
                    <tr>
                        <td class="leftTD" style="width:130px;">
                            <asp:Literal ID="Literal10" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_LongDescription %>" />：
                        </td>
                        <td class="rightTD" colspan="2">
                             <Kindeditor:KindeditorControl ID="fckLongDescription" runat="server" Height="400px" Width="99%" />
                        </td>
                    </tr>
                </table>
    </UI:TabStripTab>		
	<UI:TabStripTab ID="tabSearch" runat="server" Title="<%$ Resources:ProductView, IDS_FormField_ProductForSearch %>">        		
		    <table style="width: 100%" cellspacing="0" cellpadding="0" class="formTableList">
                <tr>
                    <td class="leftTD" style="width:130px;">
                        <asp:Literal ID="Literal11" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Title %>" />：<div>TITLE</div>
                    </td>
                    <td class="rightTD">
                        <asp:TextBox CssClass="SingleText" runat="server" ID="txtTitle" Width="280px" />
                    </td>
                    <td class="rightTD">
                        <div id="txtTitleTip" runat="server">
                        </div>
                        <Hishop:ValidateTarget ID="ValidateTarget1" runat="server" Nullable="true" ContainerId="ValidatorContainer"
                            ControlToValidate="txtTitle" Description="<%$ Resources:ProductView, IDS_FormField_TitleHelp %>">
                            <Validators>
                                <Hishop:InputStringClientValidator UpperBound="500" ErrorMessage="<%$ Resources:ProductView, IDS_FormField_TitleHelp %>" />
                            </Validators>
                        </Hishop:ValidateTarget>
                    </td>
                </tr>
                <tr>
                    <td class="leftTD" style="width:130px;">
                        <asp:Literal ID="Literal12" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_MetaDescription %>" />：<div>META_DESCRIPTION</div>
                    </td>
                    <td class="rightTD">
                        <asp:TextBox CssClass="SingleText" runat="server" ID="txtMetaDescription" Width="280px" />
                    </td>
                    <td class="rightTD">
                        <div id="txtMetaDescriptionTip" runat="server">
                        </div>
                        <Hishop:ValidateTarget ID="ValidateTargetMetaDescription" runat="server" Nullable="true"
                            ContainerId="ValidatorContainer" ControlToValidate="txtMetaDescription" Description="<%$ Resources:ProductView, IDS_FormField_MetaDescriptionHelp %>">
                            <Validators>
                                <Hishop:InputStringClientValidator UpperBound="500" ErrorMessage="<%$ Resources:ProductView, IDS_FormField_MetaDescriptionHelp %>" />
                            </Validators>
                        </Hishop:ValidateTarget>
                    </td>
                </tr>
                <tr>
                    <td class="leftTD" style="width:130px;">
                        <asp:Literal ID="Literal13" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Keywords %>" />：<div>META_KEYWORDS</div>
                    </td>
                    <td class="rightTD">
                        <asp:TextBox CssClass="SingleText" runat="server" ID="txtMetaKeywords" Width="280px" />
                    </td>
                    <td class="rightTD">
                        <div id="txtMetaKeywordsTip" runat="server">
                        </div>
                        <Hishop:ValidateTarget ID="ValidateTargetMetaKeyword" runat="server" Nullable="true"
                            ContainerId="ValidatorContainer" ControlToValidate="txtMetaKeywords" Description="<%$ Resources:ProductView, IDS_FormField_KeywordHelp %>">
                            <Validators>
                                <Hishop:InputStringClientValidator UpperBound="500" ErrorMessage="<%$ Resources:ProductView, IDS_FormField_KeywordHelp %>" />
                            </Validators>
                        </Hishop:ValidateTarget>
                    </td>
                </tr>
            </table>
    </UI:TabStripTab>
	<UI:TabStripTab ID="tabAccessories" runat="server" Title="<%$ Resources:ProductView, IDS_LinkText_ProductOptions %>"> 
		    <script type="text/javascript">
		        function ResetPager(sender, eventArgs) {
		            CB_Pager.callback();
		        }

		        function showAccessoriesDialog() {
		            if (dialogAccessories.get_isShowing()) {
		                dialogAccessories.Close();
		            }
		            else {
		                dialogAccessories.Show();
		            }
		        }
            </script>
    		<table style="width: 100%" cellspacing="0" cellpadding="0" class="formTableList">
    		    <tr>
                    <td class="leftTD" style="width:130px;">
                        <img src="../images/jiaoyiIcon.gif" alt="" /><asp:Literal ID="litAccessories" runat="server" Text="<%$ Resources:ProductView, IDS_LinkText_ProductOptions %>"></asp:Literal>：</td>
                    <td class="rightTD" colspan="2">
                        <a  style="color:Blue" onclick="showAccessoriesDialog();" href="#e">
                            <asp:Literal ID="litCheckProducts" runat="server" Text="<%$ Resources:ProductView, IDS_LinkText_ProductOptions_Add %>" /></a>
                     </td>
                </tr>
             </table>
             <table style="width: 100%" cellspacing="0" cellpadding="0">
                <tr>
                    <td  style="padding-left:25px"><asp:Literal ID="litCheckedProducts" runat="server" Text="<%$ Resources:ProductView, IDS_LinkText_ProductOptions_All %>" /></td>
                </tr>
                <tr>
                    <td style="padding-left:25px">
                    <asp:GridView ID="grdAccessories" runat="server" AutoGenerateColumns="False" DataKeyNames="RealSKU" Width="100%" CssClass="GridViewStyle" GridLines="None" ShowHeader="true">
                      <Columns>         
                          <asp:TemplateField HeaderText="<%$ Resources:ProductView, IDS_FormField_ProductName %>">
                                <ItemTemplate>
                                    <asp:Label ID="lblAccessoriesProductId" runat="server" Text='<%#Eval("ProductId") %>' Visible="false" />
                                    <Hishop:SubStringLabel ID="lblPromoteSaleProductName" StrLength="20" StrReplace="..." ToolTip='<%#Eval("ProductName") %>' Text='<%#Eval("ProductName") %>' runat="server"></Hishop:SubStringLabel>
                                    <asp:Label ID="lblAttributeValues" runat="server" Text='<%#Eval("AttributeValues") %>' />
                                </ItemTemplate>
                           </asp:TemplateField>
                           <asp:BoundField DataField="RealSKU" HeaderText="<%$ Resources:ProductView, IDS_FormField_SKU %>"  />
                           <asp:BoundField DataField="RealStock" HeaderText="<%$ Resources:ProductView, IDS_FormField_Stock %>"  />
                            <Hishop:MoneyColumnForAdmin DataField="CostPrice" HeaderText="<%$ Resources:ProductView, IDS_FormField_CostPrice %>"  />
                            <Hishop:MoneyColumnForAdmin DataField="RealPrice" HeaderText="<%$ Resources:ProductView, IDS_FormField_CommonPrice %>"  />
                            <asp:TemplateField HeaderText="<%$ Resources:Resources, IDS_Header_Options %>">
                                <ItemTemplate>
                                    <Hishop:DeleteImageLinkButton ID="lkbDelete" runat="server"  CommandName="Delete" Text="<%$ Resources:ProductView, IDS_FormField_Remove %>" />
                                </ItemTemplate>
                           </asp:TemplateField>
                         </Columns>
                         <RowStyle CssClass="grdrow"/>
                         <HeaderStyle CssClass="GridViewHeaderStyle"/>
                    </asp:GridView>
                    
                    </td>
                </tr>
    		</table>
   </UI:TabStripTab>
	<UI:TabStripTab ID="tabRelates" runat="server" Title="<%$ Resources:ProductView, IDS_LinkText_RelatedProducts %>"> 
            <script type="text/javascript">
                function ResetPagerRelatedProducts(sender, eventArgs) {
                    CB_pagerRelatedProducts.callback();
                }

                function showRelatedProductDialog() {
                    if (dialogRelatedProducts.get_isShowing()) {
                        dialogRelatedProducts.Close();
                    }
                    else {
                        dialogRelatedProducts.Show();
                    }
                }
            </script>
    		<table style="width: 100%" cellspacing="0" cellpadding="0" class="formTableList">
    		    <tr>
                    <td class="leftTD" style="width:130px;">
                        <img src="../images/jiaoyiIcon.gif" alt="" /><asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:ProductView, IDS_LinkText_RelatedProducts %>"></asp:Literal>：</td>
                    <td class="rightTD" colspan="2">
                        <a  style="color:Blue" onclick="showRelatedProductDialog();" href="#f" >
                            <asp:Literal ID="Literal9" runat="server" Text="<%$ Resources:ProductView, IDS_LinkText_RelatedProducts_Add %>" /></a>
                     </td>
                </tr>
             </table>
             <table style="width: 100%" cellspacing="0" cellpadding="0">
                <tr>
                    <td  style="padding-left:25px"><asp:Literal ID="Literal14" runat="server" Text="<%$ Resources:ProductView, IDS_LinkText_RelatedProducts_All %>" /></td>
                </tr>
                <tr>
                    <td style="padding-left:25px">
                    <asp:GridView ID="grdRelateds" runat="server" AutoGenerateColumns="False" DataKeyNames="ProductId" Width="100%" CssClass="GridViewStyle" GridLines="None" ShowHeader="true">
                      <Columns>         
                          <asp:TemplateField HeaderText="<%$ Resources:ProductView, IDS_FormField_ProductName %>">
                                <ItemTemplate>
                                    <Hishop:SubStringLabel ID="lblPromoteSaleProductName" StrLength="20" StrReplace="..." ToolTip='<%#Eval("ProductName") %>' Text='<%#Eval("ProductName") %>' runat="server"></Hishop:SubStringLabel>
                                </ItemTemplate>
                           </asp:TemplateField>
                           <asp:BoundField DataField="SKU" HeaderText="<%$ Resources:ProductView, IDS_FormField_SKU %>"  />
                           <asp:BoundField DataField="Stock" HeaderText="<%$ Resources:ProductView, IDS_FormField_Stock %>"  />
                            <Hishop:MoneyColumnForAdmin DataField="CostPrice" HeaderText="<%$ Resources:ProductView, IDS_FormField_CostPrice %>"  />
                            <Hishop:MoneyColumnForAdmin DataField="SalePrice" HeaderText="<%$ Resources:ProductView, IDS_FormField_CommonPrice %>"  />
                            <asp:TemplateField HeaderText="<%$ Resources:Resources, IDS_Header_Options %>">
                                <ItemTemplate>
                                    <Hishop:DeleteImageLinkButton ID="lkbDelete" runat="server"  CommandName="Delete" Text="<%$ Resources:ProductView, IDS_FormField_Remove %>" />
                                </ItemTemplate>
                           </asp:TemplateField>
                         </Columns>
                         <RowStyle CssClass="grdrow"/>
                         <HeaderStyle CssClass="GridViewHeaderStyle"/>
                    </asp:GridView>
                    
                    </td>
                </tr>
    		</table>
    </UI:TabStripTab>	
   </Tabs>
</UI:TabStrip>	
            <script type="text/javascript">
                var currentTypeId = "";
                var resetFlag = false;

                function CategoryChanged(categoryId) {
                    $.ajax({
                    url: "ProductHandler.aspx?action=a1&categoryId=" + categoryId + "&timestamp=" + new Date().getTime(),
                        type: 'GET',
                        dataType: 'text',
                        timeout: 10000,
                        success: function(typeId) {
                            if (typeId == "0") typeId = "";
                            if (currentTypeId != typeId) {
                                if (currentTypeId == "" || confirm("是否自动切换到与所选分类关联的商品类型?\r\n切换商品类型会丢失当前已经编辑但是还没有保存的商品规格和属性数据")) {
                                    resetFlag = true;
                                    $("#EditProduct_dropProductTypes").val(typeId);
                                    ProductTypeChanged(typeId);
                                }
                            }
                        }
                    });
                }

                function ProductTypeChanged(typeId) {
                    if (currentTypeId == typeId)
                        return;

                    if (!resetFlag) {
                        if (!confirm("切换商品类型会丢失当前已经编辑但是还没有保存的商品规格和属性数据，确定要切换吗?")) {
                            $("#EditProduct_dropProductTypes").val(currentTypeId);
                            return;
                        }
                    }

                    currentTypeId = typeId;
                    resetFlag = false;

                    tblAttributes_Reset(typeId);
                    tblSkus_Close(false);
                    RebindBrands(typeId);
                    RebindFields(typeId);
                }

                $("#EditProduct_dropProductTypes").ready(function() {
                    var typeId = $("#EditProduct_dropProductTypes").val();
                    if (typeId) {
                        currentTypeId = typeId;
                        RebindFields(typeId);
                    }
                });
                
                function RebindBrands(typeId) {
                    var action;
                    if (typeId.length > 0 && typeId != "0") {
                        action = "getBrandCategories";
                    }
                    else
                    { action = "getAllBrandCategories"; }
                    var postUrl = "ProductHandler.aspx?action=" + action + "&timestamp=";
                    postUrl += new Date().getTime() + "&typeId=" + typeId;

                    document.getElementById("EditProduct_dropBrandCategories").options.length = 0;
                    $.ajax({
                        url: postUrl,
                        type: 'GET', dataType: 'json', timeout: 10000,
                        async: false,
                        success: function(resultData) {
                            if (resultData.Status == "0") {
                            }
                            else if (resultData.Status == "OK") {
                                FillBrand(resultData.Brand);
                            }
                        }
                    });

                }

                function FillBrand(Brand) {
                    var brandCategorysSelector = $("#EditProduct_dropBrandCategories");                  
                    brandCategorysSelector.append("<option selected=\"selected\" value=\"0\"><\/option>");                                   

                    $.each(Brand, function(i, Brand) {
                    var a = Brand.BrandId;
                    var b = Brand.BrandName;
                    brandCategorysSelector.append("<option value=\"" + a + "\">" + b + "<\/option>");
                    });
                }

                function RebindFields(typeId) {
                    $("#fieldlist").empty();
                    $("#optionlist").empty();
                    
                    if (typeId) {
                        $.ajax({
                            url: "ProductHandler.aspx?action=a2&typeId=" + typeId + "&timestamp=" + new Date().getTime(),
                            type: 'GET',
                            dataType: 'json',
                            timeout: 10000,
                            success: function(resultData) {
                                $.each(resultData.Fields, function(i, item) {
                                    var itemContainer = $("<div><span style=\"cursor:pointer;display:block;\" onclick=\"selectField(this);\" value=\"" + item.AttributeId + "\" options=\"" + item.Options + "\">" + item.AttributeName + "</span></div>");
                                    $("#fieldlist").append(itemContainer);
                                });
                            }
                        });
                    }
                }

                function selectField(selectedField) {
                    if ($("#txtFieldName").val() == selectedField.innerHTML)
                        return;
                    
                    $("#optionlist").empty();
                    $("#txtFieldName").val(selectedField.innerHTML);
                    $("#txtOptions").val("");

                    var options = selectedField.attributes["options"].nodeValue.split(",");
                    $.each(options, function(i, option) {
                        if (option.length > 0) {
                            var optionContainer = $("<div><span style=\"cursor:pointer;display:block;\" onclick=\"selectOption(this);\">" + option + "</span></div>");
                            $("#optionlist").append(optionContainer);
                        }
                    });
                }

                function selectOption(selectedOption) {
                    var allOptions = "," + $("#txtOptions").val().replace(new RegExp("\r\n", "gm"), ",");
                    allOptions = allOptions.replace(new RegExp("\n", "gm"), ",");
                    
                    if (allOptions.indexOf("," + selectedOption.innerHTML + ",") < 0) {
                        $("#txtOptions").val($("#txtOptions").val() + selectedOption.innerHTML + "\r\n");
                    }
                }

                function addField() {
                    if ($("#txtFieldName").val().length == 0 || $("#txtOptions").val().length == 0) {
                        dlgSpecs.Close();
                        return;
                    }

                    var options = $("#txtOptions").val().replace(new RegExp("\r\n", "gm"), ",");
                    options = options.replace(new RegExp("\n", "gm"), ",");
                    
                    tblSkus_AddField($("#txtFieldName").val(), options);
                    dlgSpecs.Close();

                    $("#txtFieldName").val("");
                    $("#txtOptions").val("");
                }

                function OpenAddSKUField() {
                    dlgSpecs.Show();
                }
            </script>
            
            <UI:Dialog ID="dlgSpecs" Title="<%$ Resources:ProductView, IDS_FormField_SKUs_Add %>" Modal="true" ShowTransition="Pixelate" CloseTransition="Pixelate" AnimationDuration="200" AllowDrag="true" AllowResize="true" Alignment="MiddleCentre" runat="server" Width="510">
                <Content>
                    <table style="width: 100%" cellspacing="0" cellpadding="5">
                        <tr>
                            <td style="width:50%;vertical-align:top;">
                                <div style="background-color:#eeeeee; border:solid 1px #999999; padding:3px 3px 3px 3px;">
                                    <b><asp:Literal ID="Literal26" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_SKUs_Old %>" /></b>
                                </div>
                                <div id="fieldlist" style="overflow-y:auto;border:solid 1px #999999; padding:3px 3px 3px 3px;height:80px;">
                                </div>
                            </td>
                            <td style="width:50%;vertical-align:top;">
                                <div style="background-color:#eeeeee; border:solid 1px #999999;padding:3px 3px 3px 3px;">
                                   <b><asp:Literal ID="Literal36" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_SKUs_Check %>" /></b>
                                </div>
                                <div id="optionlist" style="overflow-y:auto;border:solid 1px #999999; padding:3px 3px 3px 3px;height:80px;">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:center" colspan="2">
                                <table style="width:100%;">
                                    <tr>
                                        <td></td>
                                        <td style="text-align:left">
                                            <asp:Literal ID="Literal27" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_SKUs_Message %>" />
                                        </td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td style="text-align:right;width:25%;">
                                            <asp:Literal ID="Literal28" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_SKUs_Name %>" />：
                                        </td>
                                        <td style="width:60%;"><input type="text" id="txtFieldName" style="width:100%;" /></td>
                                        <td style="width:15%;text-align:left;"></td>
                                    </tr>
                                    <tr>
                                        <td style="text-align:right;width:25%;">
                                            <asp:Literal ID="Literal29" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_SKUs_Values %>" />
                                        </td>
                                        <td style="width:60%;"><textarea rows="5" style="width:100%;" id="txtOptions"></textarea></td>
                                        <td style="width:15%;text-align:left;"></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td style="text-align:center; background-color:#eeeeee; border-top:solid 1px #999999" colspan="2">
                                <input type="button" value="确 定" onclick="addField();" />
                                <input type="button" value="取 消" onclick="dlgSpecs.Close();" />
                            </td>
                        </tr>
                    </table>
                </Content>
            </UI:Dialog>
            
            <UI:Dialog Modal="true" ShowTransition="Pixelate" CloseTransition="Pixelate" AnimationDuration="200" AllowDrag="true" AllowResize="true" Alignment="MiddleCentre" runat="server" Width="600" Title="从下面的商品列表中选择配件"
                        ID="dialogAccessories" runat="server" >
                        <Content>
                            <table style="width:100%">
                                <tr>
                                    <td class="searchTableLeftTD"><nobr><asp:Label ID="lblProductCategory" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Category %>"></asp:Label>：</nobr></td>
                                    <td class="searchTableControlTD" colspan="2"><nobr><Hishop:ProductCategoriesDropDownList ID="dropAccessoriesCategories" runat="server" /> </nobr></td>
                                    <td class="searchTableLeftTD"><nobr><asp:Label ID="lblSearchText" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_ProductName %>"></asp:Label>：</nobr></td>
                                    <td class="searchTableControlTD"><asp:TextBox ID="txtSearchText" runat="server" Width="150" ></asp:TextBox></td>
                                    <td align="left"><input type="button"  value="查询" onclick="grdAccessoriesProducts_ReBindData();"  /></td>
                                </tr>
                                <tr>
                                   <td colspan="5">
                                    <UI:CallBack id="CB_AccessoriesProducts" ClientSideOnCallbackComplete="ResetPager" CacheContent="false" runat="server" PostState="true" Debug="false">
                                      <Content>
                                       <UI:Grid ID="grdAccessoriesProducts" runat="server" AutoGenerateColumns="False"  CallBackDataKey="RealSKU"
                                            CellPadding="4" GridLines="None" AllowSorting="false" 
                                            Width="100%" RunningMode="Callback" EnableCheckBox="true" >
                                            <Columns>       
                                                   <asp:BoundField DataField="RealSKU" HeaderText="<%$ Resources:ProductView, IDS_FormField_SKU %>"  />
                                                   <asp:BoundField DataField="ProductName" HeaderText="<%$ Resources:ProductView, IDS_FormField_ProductName %>"  />
                                                   <asp:BoundField DataField="AttributeValues" HeaderText="<%$ Resources:ProductView, IDS_FormField_SKUs_Value %>"  />
                                                   <asp:BoundField DataField="RealStock" HeaderText="<%$ Resources:ProductView, IDS_FormField_Stock %>"  />
                                                   <Hishop:MoneyColumnForAdmin DataField="CostPrice" HeaderText="<%$ Resources:ProductView, IDS_FormField_CostPrice %>"  />
                                                    <Hishop:MoneyColumnForAdmin DataField="RealPrice" HeaderText="<%$ Resources:ProductView, IDS_FormField_CommonPrice %>"  />                                        
                                            </Columns>
                                            
                                       </UI:Grid>
                                      </Content>
                                   </UI:CallBack>
                                    <div style="text-align:left">
                                        <UI:CallBack id="CB_Pager" CacheContent="false" PostState="true" Debug="false" runat="server">
                                        <Content>
                                            <UI:Pager runat="server" ListToPaging="grdAccessoriesProducts" ListToCallBackID="CB_AccessoriesProducts" RunningMode="Callback" ID="pager" />
                                        </Content>
                                        </UI:CallBack>
                                    </div>
                                   </td>
                                </tr>
                             </table>
                             <div class="footer">
                               <asp:Button ID="btnAddAccessories" runat="server" Text="<%$ Resources:Resources, IDS_Button_Confirm %>" CssClass="inp_L1" />
                            </div>
                            
                        </Content>
                    </UI:Dialog>
                    
            <UI:Dialog Modal="true" ShowTransition="Pixelate" CloseTransition="Pixelate" AnimationDuration="200" AllowDrag="true" AllowResize="true" Alignment="MiddleCentre" runat="server" Width="600" Title="从已有的商品中选择相关商品"
                        ID="dialogRelatedProducts"  >
                        <Content>
                            <table style="width:100%">
                                <tr>
                                    <td class="searchTableLeftTD"><nobr><asp:Label ID="Label1" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_Category %>"></asp:Label>：</nobr></td>
                                    <td class="searchTableControlTD" colspan="2"><nobr><Hishop:ProductCategoriesDropDownList ID="dropRdlatedCategories" runat="server" /> </nobr></td>
                                    <td class="searchTableLeftTD"><nobr><asp:Label ID="Label2" runat="server" Text="<%$ Resources:ProductView, IDS_FormField_ProductName %>"></asp:Label>：</nobr></td>
                                    <td class="searchTableControlTD"><asp:TextBox ID="txtRelateProductName" runat="server" Width="150" ></asp:TextBox></td>
                                    <td align="left"><input type="button"  value="查询" onclick="grdRelatedProducts_ReBindData();"  /></td>
                                </tr>
                                <tr>
                                   <td colspan="5">
                                    <UI:CallBack id="CB_grdRelatedProducts" ClientSideOnCallbackComplete="ResetPagerRelatedProducts" CacheContent="false" runat="server" PostState="true" Debug="false">
                                      <Content>
                                       <UI:Grid ID="grdRelatedProducts" runat="server" AutoGenerateColumns="False"  CallBackDataKey="ProductId"
                                            CellPadding="4"  GridLines="None" AllowSorting="false" 
                                            Width="100%" RunningMode="Callback" EnableCheckBox="true" >
                                            <Columns>          
                                                   <asp:BoundField DataField="SKU" HeaderText="<%$ Resources:ProductView, IDS_FormField_SKU %>"  />
                                                   <asp:BoundField DataField="ProductName" HeaderText="<%$ Resources:ProductView, IDS_FormField_ProductName %>"  />
                                                   <asp:BoundField DataField="Stock" HeaderText="<%$ Resources:ProductView, IDS_FormField_Stock %>"  />
                                                   <Hishop:MoneyColumnForAdmin DataField="CostPrice" HeaderText="<%$ Resources:ProductView, IDS_FormField_CostPrice %>"  />
                                                    <Hishop:MoneyColumnForAdmin DataField="SalePrice" HeaderText="<%$ Resources:ProductView, IDS_FormField_CommonPrice %>"  />                                        
                                            </Columns>
                                            
                                       </UI:Grid>
                                      </Content>
                                   </UI:CallBack>
                                    <div style="text-align:left">
                                        <UI:CallBack id="CB_pagerRelatedProducts" CacheContent="false" PostState="true" Debug="false" runat="server">
                                        <Content>
                                            <UI:Pager runat="server" ListToPaging="grdRelatedProducts" ListToCallBackID="CB_grdRelatedProducts" RunningMode="Callback" ID="pagerRelatedProducts" />
                                        </Content>
                                        </UI:CallBack>
                                    </div>
                                   </td>
                                </tr>
                             </table>
                             <div class="footer">
                               <asp:Button ID="btnAddRelateProducts" runat="server" Text="<%$ Resources:Resources, IDS_Button_Confirm %>" CssClass="inp_L1" />
                            </div>
                            
                        </Content>
                    </UI:Dialog>
            <div id="subProduct" style="position:absolute;">
                            <asp:Button runat="server" ID="btnUpdate" Text="<%$ Resources:ProductView, IDS_Button_SubmitAdd %>" CssClass="inp_L1" OnClientClick="return PageIsValid();" />
                            <asp:Button runat="server" ID="btnBack" Text="<%$ Resources:Resources, IDS_Button_Back %>" CssClass="inp_L1" />
            </div>
            
        </SkinTemplate>
        </Hishop:EditProduct>
        <script type="text/javascript" language="javascript">
            //定位提交按钮的页面位置;
            $(document).ready(function() {
                document.getElementById('subProduct').style.top = getTop(document.getElementById('tabs')) + 'px';
                document.getElementById('subProduct').style.left = 440 + 'px';
            });
            function getTop(e) {
                var offset = e.offsetTop;
                if (e.offsetParent != null) offset += getTop(e.offsetParent);
                return offset;
            }
        </script>
        <br />
        <div style="margin:0px auto;width:500px;clear:both;">
            <hr style="width: 500px;" />
            <Hishop:SiteCopyright ID="SiteCopyright1" runat="server" />
        </div>
        <br />
        <Hishop:ValidatorContainer runat="server" ID="ValidatorContainer" />
        
        <script type="text/javascript" language="javascript">
            $(document).ready(function() {
                if (currentTypeId.length > 0 || $("#EditProduct_dropProductTypes").val().length == 0)
                    return;

                currentTypeId = $("#EditProduct_dropProductTypes").val();                
                RebindFields(currentTypeId);
            });
        </script>
    </form>
</body>
</html>