<%
 //----------------------------------------------------------------
 //文件名称：Template_Lable_Malls_Link_Dialog.aspx
 //类 名 称：
 //描    述：商品详细页面标签创建
 //创建标识：Add By 钟登科 2008-11-15
 //修改标识：Mod By 钟登科 2008-11-15
 //修改内容：增加了调用数据条数
 //----------------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Template_Lable_Malls_Link_Dialog, V5Shop.Shop.Template" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!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><%=TitleName %></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">
    <script type="text/javascript" language="javascript" src="js/Common.js"></script>
    <style>
        .OperateTable tr td div{padding-left:10px;}
        .hback td {height:16px;}
        .hback td div{height:16px; padding:2px 0 0 0;}
    </style>
    <base Target="_self" /> 
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table width="100%" style="border:solid 1px;" height="40" border="0" align=center cellpadding="0" cellspacing="0" class="table" valign=absmiddle>
            <tr> 
                <td colspan="2"  align="Left" height="30">
            
                <div class="OperateTitle">
                <div id="tab1" style="float:left; padding-left:20px; cursor:pointer" ><strong style="font-size:14px; color:#000">【商品详细页面标签创建】</strong></div>

                <p style="float:right; padding-right:10px;" align="right"> 
                    <a href="http://www.021web.com.cn/" target="_blank">查看视频帮助</a>
                
                    <input name="button4" type="button" onClick="window.returnValue='';window.close();" value="关闭窗口" class="button">
                </p></div></td>
            </tr>
        </table>
        <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="table">
		<tr class="hback">
			<td width="24%"><div id="toparea_1" style="background:#666666;" align="center"><a href="javascript:showtab(1);"><font color="#FFFFFF">商品详细</font></a></div></td>
			<td width="24%"><div id="toparea_2" style="background:#666666" align="center"><a href="javascript:showtab(2);"><font color="#FFFFFF">自定义属性</font></a></div></td>
			<td width="24%"><div id="toparea_3" style="background:#666666" align="center"><a href="javascript:showtab(3);"><font color="#FFFFFF">相关活动</font></a></div></td>
			<td width="24%"><div id="toparea_4" style="background:#666666" align="center"><a href="javascript:showtab(4);"><font color="#FFFFFF">相关商品</font></a></div></td>
		</tr>
		<tr class="hback">
		  <td><div id="toparea_5" style="background:#666666" align="center"><a href="javascript:showtab(5);"><font color="#FFFFFF">相关文章</font></a></div></td>
		  <td><div id="toparea_6" style="background:#666666" align="center"><a href="javascript:showtab(6);"><font color="#FFFFFF">商品属性</font></a></div></td>
		  <td><div id="toparea_7" style="background:#666666" align="center"><a href="javascript:showtab(7);"><font color="#FFFFFF">商品配件</font></a></div></td>
		  <td><div id="toparea_8" style="background:#666666" align="center"><a href="javascript:showtab(8);"><font color="#FFFFFF">商品评论</font></a></div></td>
	  </tr>
	  <tr class="hback">
		  <td><div id="toparea_13" style="background:#666666" align="center"><a href="javascript:showtab(13);"><font color="#FFFFFF">商品多图</font></a></div></td>
		  <td><div id="toparea_10" style="background:#666666" align="center"><a href="javascript:showtab(10);"><font color="#FFFFFF">还浏览过商品</font></a></div></td>
		  <td><div id="toparea_11" style="background:#666666" align="center"><a href="javascript:showtab(11);"><font color="#FFFFFF">还收藏过商品</font></a></div></td>
		  <td><div id="toparea_12" style="background:#666666" align="center"><a href="javascript:showtab(12);"><font color="#FFFFFF">最近浏览</font></a></div></td>
	  </tr>
	  <tr class="hback" style="display:none">
		  <td><div id="toparea_9" style="background:#666666" align="center"><a href="javascript:showtab(9);"><font color="#FFFFFF">客户感言</font></a></div></td>
		  <td><div id="toparea_14" style="background:#666666" align="center"></div></td>
		  <td><div id="toparea_15" style="background:#666666" align="center"></div></td>
		  <td><div style="background:#666666" align="center"><a href="javascript:showtab(12);"><font color="#FFFFFF"></font></a></div></td>
	  </tr>
	</table>
	
	<input type="hidden" id="LableTag" value="1" />
	<input type="hidden" id="TagName" value="readmalls" />

    <div>
        <table id="Area_1" class="OperateTable" width="100%" height="100" border="0" align=center cellpadding="0" cellspacing="0" valign=absmiddle>
            
            <tr id="s_type_3">
                <td align="center" class="hback" ><div align="left"><b>数量限制：</b></div></td>
                <td class="hback" >
                    您想要调用
                    <input type="text" id="countnum" size="2" value="10" onchange="return checkNum('countnum', 1)" />
                    条数据
                </td>
            </tr>
        
            <tr id="out_type" style="display:none;">
                <td align="center" class="hback" ><div align="left"><b>标签的输出格式：</b></div></td>
                <td class="hback" >
                    <input type="radio" class="radio" name="c_type_3" value="out_Table" id="type_7" onclick="out_Table_Click()" checked="checked" /><label for="type_7">Table格式</label>
                    <input type="radio" class="radio" name="c_type_3" value="out_Div" id="type_8" onclick="out_Div_Click()" /><label for="type_8">Div格式</label>
                    <input type="radio" class="radio" name="c_type_3" value="out_Ul" id="type_9" onclick="out_Ul_Click()" /><label for="type_9">UL+LI格式</label>
                    <input type="radio" class="radio" name="c_type_3" value="out_None" id="type_10" onclick="out_None_Click()" /><label for="type_10">无格式</label>
                </td>
            </tr>
            <tr id="s_type_7" style="display:none;">
                <td align="center" class="hback" ><div align="left"></div></td>
                <td class="hback" >
                    TABLE的宽度为
                    <input type="text" id="tablewidth" size="1" value="100" onchange="return checkNum('tablewidth', 1)" />
                    <select id="widthtype">
                        <option value="%">百分比</option>
                        <option value="px">象素</option>
                    </select>
                    &nbsp;&nbsp;
                    您每行想显示
                    <input type="text" id="tablecount" size="2" value="2" onchange="return checkNum('tablecount', 1)" />
                    个商品
                </td>
            </tr>
            <tr id="s_type_8" style="display:none;">
                <td align="center" class="hback" ><div align="left"></div></td>
                <td class="hback" >
                    每个DIV上的样式为
                    <input type="text" id="divclassname" size="8" value="classname" />
                </td>
            </tr>
            <tr id="s_type_9" style="display:none;">
                <td align="center" class="hback" ><div align="left"></div></td>
                <td class="hback" >
                    您每行想显示
                    <input type="text" id="ulcount" size="2" value="2" onchange="return checkNum('ulcount', 1)" />
                    个商品
                    &nbsp;&nbsp;
                    每个UL上的样式为
                    <input type="text" id="ulclass" size="8" value="classname" />
                </td>
            </tr>
            
            <tr id="Need_1">
                <td width="26%" align="center" class="hback" ><div align="left"><b>调用样式：</b></div></td>
                <td width="74%" class="hback" >
                    <select id="styleid"  name="MallsStyle" style="width:200px;">
                        <asp:Repeater ID="MallsTyleOptions" runat="server">
                            <ItemTemplate>
                                <option value="<%#Eval("Name") %>"><%#Eval("Name") %></option>
                            </ItemTemplate>
                        </asp:Repeater>
                    </select> 
                    <input type="button" value="查看选中样式" class="button" onclick="GetSelectedLabelView('styleid', 'MS')" id="btnMall"/>
                    
                    <select id="actstyleid"  name="MallsActStyle" style="width:200px;display:none;">
                        <asp:Repeater ID="MallsActOptions" runat="server">
                            <ItemTemplate>
                                <option value="<%#Eval("Name") %>"><%#Eval("Name") %></option>
                            </ItemTemplate>
                        </asp:Repeater>
                    </select> 
                    <input type="button" value="查看选中样式" class="button" onclick="GetSelectedLabelView('actstyleid', 'hs')" id="btnAct" style="display:none"/>
                    
                                        
                    <select id="articlestyleid"  name="MallsArticleStyle" style="width:200px;display:none;">
                        <asp:Repeater ID="MallsArticleOptions" runat="server">
                            <ItemTemplate>
                                <option value="<%#Eval("Name") %>"><%#Eval("Name") %></option>
                            </ItemTemplate>
                        </asp:Repeater>
                    </select> 
                    <input type="button" value="查看选中样式" class="button" onclick="GetSelectedLabelView('articlestyleid', 'AS')" id="btnArticle" style="display:none"/>
                    
                </td>
            </tr>
            <tr id="Tr1">
                <td align="center" class="hback" style="height: 23px" ><div align="left"></div></td>
                <td class="hback" style="height: 23px" >
                    标题长度限制在
                    <input type="text" id="titlecount" size="1" value="30" onchange="return checkNum('titlecount', 1)" />
                    个字以内
                </td>
            </tr>
            <tr id="Tr2" style="display:none;">
                <td align="center" class="hback" ><div align="left"></div></td>
                <td class="hback" >
                    简介长度限制在
                    <input type="text" id="markcount" size="1" value="200" onchange="return checkNum('markcount', 1)" />
                    个字以内
                </td>
            </tr>
            <tr id="Tr4" style="display:none;">
                <td align="center" class="hback" ><div align="left"></div></td>
                <td class="hback" >
                    日期格式为
                    <input type="text" id="datetype" size="26" value="YY02-MM-DD" />
                </td>
            </tr>
            <tr id="Tr5">
                <td align="center" class="hback" ><div align="left"></div></td>
                <td class="hback" >
                    图片宽为
                    <input type="text" id="imgwidth" size="1" value="90" onchange="return checkNum('imgwidth', 1)" />
                    高为
                    <input type="text" id="imgheight" size="1" value="90" onchange="return checkNum('imgheight', 1)" />
                </td>
            </tr>
            <tr id="OpenModel">
                <td align="center" class="hback" ><div align="left"><b>窗口打开模式：</b></div></td>
                <td class="hback" >
                    <input type="checkbox" class="checkbox" name="c_type_6" value="3" id="Checkbox2" checked="checked" /><label for="Checkbox2">新窗口打开</label>
                </td>
            </tr>
            
            <tr id="Submit_Area"> 
              <td colspan="3" align="center" height="30"> 
                <input name="button" type="button" onClick="InitValue(this.form)" value="<%=ButtonValue %>" class="button"> 
                <input name="button" type="button" onClick="window.returnValue='';window.close();" value=" 取 消 " class="button">     
              </td>
            </tr>
        </table>
    </div>
        
        <script language="javascript" type="text/javascript">
            var height = 513;
            
            function GetObj(id){
                return document.getElementById(id);
            }
            
            function showtab(count){
                var listhidden = "",listshow="";
                //更改样式
                GetObj("styleid").style.display = "";
                GetObj("btnMall").style.display = "";
                GetObj("articlestyleid").style.display = "none";
                GetObj("btnArticle").style.display = "none";
                GetObj("actstyleid").style.display = "none";
                GetObj("btnAct").style.display = "none";
                
                switch(count){
                    case 1:
                        listhidden = "out_type,s_type_3,s_type_7,OpenModel,Tr1,Tr2,btnAct";
                        listshow="Need_1,Tr4,Tr5,btnMall"
                        GetObj("TagName").value = "readmalls";
                        break;
                    case 2:
                        listhidden = "Tr4,Tr5,OpenModel,Tr1,Tr2,btnAct";
                        listshow="out_type,s_type_3,s_type_7,Need_1,btnMall"
                        GetObj("TagName").value = "mallself";
                        break;
                    case 3:
                        listhidden = "btnMall";
                        listshow="out_type,s_type_3,s_type_7,Need_1,Tr4,Tr5,OpenModel,Tr1,Tr2,btnAct"
                        GetObj("TagName").value = "mallact";
                        //更改样式
                        GetObj("styleid").style.display = "none";
                        GetObj("btnMall").style.display = "none";
                        GetObj("articlestyleid").style.display = "none";
                        GetObj("btnArticle").style.display = "none";
                        GetObj("actstyleid").style.display = "";
                        GetObj("btnAct").style.display = "";
                        break;
                    case 4:
                        listhidden = "btnAct";
                        listshow="out_type,s_type_3,s_type_7,Need_1,Tr4,Tr5,OpenModel,Tr1,Tr2,btnMall"
                        GetObj("TagName").value = "mallpro";
                        break;
                    case 5:
                        listshow="out_type,s_type_3,s_type_7,Need_1,Tr4,Tr5,OpenModel,Tr1,Tr2"
                        GetObj("TagName").value = "mallarticle";
                        //更改样式
                        GetObj("styleid").style.display = "none";
                        GetObj("btnMall").style.display = "none";
                        GetObj("actstyleid").style.display = "none";
                        GetObj("btnAct").style.display = "none";
                        GetObj("articlestyleid").style.display = "";
                        GetObj("btnArticle").style.display = "";
                        break;
                    case 6:
                        listhidden = "Tr4,Tr5,OpenModel,Tr1,Tr2,btnAct";
                        listshow="out_type,s_type_3,s_type_7,Need_1,btnMall"
                        GetObj("TagName").value = "mallproperty";
                        break;
                    case 7:
                        listhidden = "btnAct";
                        listshow="out_type,s_type_3,s_type_7,Need_1,Tr4,Tr5,OpenModel,Tr1,Tr2,btnMall"
                        GetObj("TagName").value = "mallfit";
                        break;
                    case 8:
                        listhidden = "OpenModel,Tr5,btnAct";
                        listshow="out_type,s_type_3,s_type_7,Need_1,Tr4,Tr1,Tr2,btnMall"
                        GetObj("TagName").value = "mallreview";
                        break;
                    case 9:
                        listhidden = "btnAct";
                        listshow="out_type,s_type_3,s_type_7,Need_1,Tr4,Tr5,OpenModel,Tr1,Tr2,btnAct"
                        GetObj("TagName").value = "mallganyan";
                        break;
                    case 10:
                        listhidden = "btnAct";
                        listshow="out_type,s_type_3,s_type_7,Need_1,Tr4,Tr5,OpenModel,Tr1,Tr2,btnMall"
                        GetObj("TagName").value = "mallviewnext";
                        break;
                    case 11:
                        listhidden = "btnAct";
                        listshow="out_type,s_type_3,s_type_7,Need_1,Tr4,Tr5,OpenModel,Tr1,Tr2"
                        GetObj("TagName").value = "mallcollect";
                        break;
                    case 12:
                        listhidden = "btnAct";
                        listshow="out_type,s_type_3,s_type_7,Need_1,Tr4,Tr5,OpenModel,Tr1,Tr2,btnMall"
                        GetObj("TagName").value = "mallview";
                        break;
                    case 13:
                        listhidden = "Tr4,OpenModel,Tr1,Tr2,btnAct";
                        listshow="out_type,s_type_3,s_type_7,Need_1,btnMall,Tr5"
                        GetObj("TagName").value = "mallimg";
                        break;
                }
                //全部初始化
                for(var i=1;i<=15;i++){
                    document.getElementById("toparea_" + i).style.backgroundColor = '#666';
                }
                //背景变化
                document.getElementById("toparea_" + count).style.backgroundColor = '#ccc';
                //根据字符串判断是否显示
                HiddenOrShow(listhidden,listshow);
                //赋值
                GetObj("LableTag").value = count;
            }
            
            function HiddenOrShow(strlisthidden,strlistshow){
                var ary = strlisthidden.split(",");
                var ary2 = strlistshow.split(",");
               for(var i=0;i<ary.length;i++)
               {
                    if(ary[i]!="")
                        GetObj(ary[i]).style.display = "none";
               }
               for(var i=0;i<ary2.length;i++)
               {
                    if(ary2[i]!="")
                        GetObj(ary2[i]).style.display = "";
               }
                
                InitNewTrClass();
            }

             
            function InitNewTrClass(){
                InitTrClassById("Area_1");
            }
            
            function InitValue(){
                var typeid = GetObj("LableTag").value;
                var tagname = GetObj("TagName").value;
                var tempstr = "{web:ms=" + tagname;
                //判断调用哪个样式
                if(GetObj("actstyleid").style.display == "")
                {
                    tempstr = "{web:hs=" + tagname;
                }
                if(GetObj("articlestyleid").style.display == "")
                {
                    tempstr = "{web:as=" + tagname;
                }
                
                //数量限制
                if(GetObj("s_type_3").style.display != "none"){
                    tempstr += "┆Loop$" + GetObj("countnum").value;
                }
                
                //输出格式判断
                var outtype = GetObjValueByName("c_type_3");
                if(GetObj("out_type").style.display != "none")
                {
                    switch(outtype){
                        case "out_Table":
                            tempstr += "┆输出格式$out_Table┆排列列数$" + GetObj("tablecount").value + "┆标签宽度$" + GetObj("tablewidth").value + GetObj("widthtype").value;
                            break;
                        case "out_Div":
                            tempstr += "┆输出格式$out_Div┆标签样式$" + GetObj("divclassname").value;
                            break;
                        case "out_Ul":
                            tempstr += "┆输出格式$out_Ul┆排列列数$" + GetObj("ulcount").value + "┆标签样式$" + GetObj("ulclass").value;
                            break;
                        case "out_None":
                            tempstr += "┆输出格式$out_None";
                            break;
                    }
                }
                
                //判断调用哪个样式
                if(GetObj("actstyleid").style.display == "")
                {
                    tempstr += "┆引用样式$" + GetObj("actstyleid").value;
                }
                else if(GetObj("styleid").style.display == "")
                {
                    tempstr += "┆引用样式$" + GetObj("styleid").value;
                }
                else  //Mod By 钟登科 2008-11-26
                {
                  tempstr += "┆引用样式$" + GetObj("articlestyleid").value;
                }
                
                if(tagname != "mallself")
                {
                    //标题长度
                    if(GetObj("Tr1").style.display !="none")
                        tempstr += "┆标题数$" + GetObj("titlecount").value;
                    //简介长度
                    if(GetObj("Tr2").style.display !="none")
                        tempstr += "┆简介长度$" + GetObj("markcount").value;
                    //日期格式
                    if(GetObj("Tr4").style.display !="none")
                        tempstr += "┆日期格式$" + GetObj("datetype").value;
                    //图片尺寸
                    if(GetObj("Tr5").style.display !="none")
                        tempstr += "┆缩略图宽高$" + GetObj("imgwidth").value + "*" + GetObj("imgheight").value;
                    //是否新窗口打开
                    if(GetObj("Checkbox2").checked == true && GetObj("OpenModel").style.display !="none")
                        tempstr += "┆打开窗口$1";
                 }   
                 
                tempstr += "}";
                
                //返回
                if (navigator.appVersion.indexOf("MSIE") == -1){
                    window.opener.returnAction(tempstr);
                    window.close();
                }else{
                    window.returnValue = tempstr;
                    window.close();
                }
            }
            
            //初始化
            InitNewTrClass();
            showtab(1);
            
    
            function checkNum(id, count){
                var obj = document.getElementById(id);
                if(obj.value < count || isNaN(obj.value) || obj.value.indexOf('.') != -1){
                    alert("请输入一个大于等于" + count + "的整数");
                    return false;
                }
                return true;
            }
        
            function GetObjValueByName(s){
                var obj = document.getElementsByName(s);
                for(var i=0;i<obj.length;i++){
                    if(obj[i].checked == true)
                        return obj[i].value;
                }
                return "";
            }
            
            function out_Table_Click(){
                if(document.getElementById('s_type_7').style.display == 'none' && document.getElementById('s_type_8').style.display == 'none' && document.getElementById('s_type_9').style.display == 'none')
                    height += 41;
                HiddenField_3();
                document.getElementById('s_type_7').style.display='';
                InitNewTrClass();
                window.dialogHeight = height + "px";
            }
            
            function out_Div_Click(){
                if(document.getElementById('s_type_7').style.display == 'none' && document.getElementById('s_type_8').style.display == 'none' && document.getElementById('s_type_9').style.display == 'none')
                    height += 41;
                HiddenField_3();
                document.getElementById('s_type_8').style.display='';
                InitNewTrClass();
                window.dialogHeight = height + "px";
            }
            
            function out_Ul_Click(){
                if(document.getElementById('s_type_7').style.display == 'none' && document.getElementById('s_type_8').style.display == 'none' && document.getElementById('s_type_9').style.display == 'none')
                    height += 41;
                HiddenField_3();
                document.getElementById('s_type_9').style.display='';
                InitNewTrClass();
                window.dialogHeight = height + "px";
            }
            
            function out_None_Click(){
                if(document.getElementById('s_type_7').style.display == '' || document.getElementById('s_type_8').style.display == '' || document.getElementById('s_type_9').style.display == '')
                    height -= 41;
                HiddenField_3();
                InitNewTrClass();
                window.dialogHeight = height + "px";
            }
    
            function HiddenField_3(){
                document.getElementById('s_type_7').style.display='none';
                document.getElementById('s_type_8').style.display='none';
                document.getElementById('s_type_9').style.display='none';
            }
            
            function showArea_15(){
                //document.getElementById('Tr1').style.display = document.getElementById('Tr1').style.display == '' ? 'none' : '';
                if(document.getElementById('Tr1').style.display == '')
                    height += 41;
                else
                    height -= 41;
                InitNewTrClass();
                window.dialogHeight = height + "px";
            }
            function showArea_16(){
                //document.getElementById('Tr2').style.display = document.getElementById('Tr2').style.display == '' ? 'none' : '';
                if(document.getElementById('Tr2').style.display == '')
                    height += 41;
                else
                    height -= 41;
                InitNewTrClass();
                window.dialogHeight = height + "px";
            }
            function showArea_18(){
                //document.getElementById('Tr4').style.display = document.getElementById('Tr4').style.display == '' ? 'none' : '';
                if(document.getElementById('Tr4').style.display == '')
                    height += 41;
                else
                    height -= 41;
                InitNewTrClass();
                window.dialogHeight = height + "px";
            }
            function showArea_19(){
                //document.getElementById('Tr5').style.display = document.getElementById('Tr5').style.display == '' ? 'none' : '';
                if(document.getElementById('Tr5').style.display == '')
                    height += 41;
                else
                    height -= 41;
                InitNewTrClass();
                window.dialogHeight = height + "px";
            }
//            function showArea_20()
//            {
//               if(document.getElementById('s_type_3').style.display=='')
//                 
//            }
        </script>

<script language="javascript" type="text/javascript">
    InitData();
    
    function InitData(){
        <%=LabelType %>
        //输出格式
        var outstyle = "<%=OutStyle %>";
        var tablewidth = "<%=TableWidth %>";
        var tablewidthtype = "%";
        BindObjByName("c_type_3", "<%=OutStyle %>");
        switch(outstyle){
            case "out_Table":
                if(tablewidth.indexOf("%") == -1){
                    tablewidthtype = "px";
                }
                GetObj("tablewidth").value = tablewidth.replace("%","").replace("px","");
                BindSelect("widthtype", tablewidthtype);
                GetObj("tablecount").value = "<%=TableCount %>";
                break;
            case "out_Div":
                GetObj("divclassname").value = "<%=LabelCss %>";
                break;
            case "out_Ul":
                GetObj("ulclass").value = "<%=LabelCss %>";
                GetObj("ulcount").value = "<%=TableCount %>";
                break;
            case "out_None":
                
                break;
        }
        //调用样式  Mod By 钟登科 2008-11-26
           BindSelect("styleid", "<%=StyleName %>");
           BindSelect("actstyleid", "<%=StyleName %>");
           BindSelect("articlestyleid", "<%=StyleName %>");
        //排序字段和方向
        //BindSelect("orderfield", "<%=OrderField %>");
        //BindSelect("orderdirection", "<%=OrderDirection %>");
        //图片尺寸
        var imglength = "<%=ImgLength %>";
        if("<%=ImgLength %>" != ""){
            //GetObj("Checkbox1").checked = true;
            BindWidth(imglength);
        }else{
            showArea_19();
            //GetObj("Checkbox1").checked = false;
        }
        //调用数据条数 Mod By 钟登科 2008-11-15
        var countnum="<%=Count %>";
        if(countnum!="")
        {
            GetObj("countNum").value=countnum;
        }
        else
        {
        }
        //标题长度
        var titlecount = "<%=TitleLength %>";
        if(titlecount != ""){
            //GetObj("Radio3").checked = true;
            GetObj("titlecount").value = titlecount;
        }else{
            showArea_15();
            //GetObj("Radio3").checked = false;
        }
        //简介长度
        var shortcontent = "<%=ShortContentLength %>";
        if(shortcontent != ""){
            //GetObj("Radio4").checked = true;
            GetObj("markcount").value = shortcontent;
            showArea_16();
        }else{
            //GetObj("Radio4").checked = false;
        }
        //日期格式
        var dateformat = "<%=DateFormat %>";
        if(dateformat != ""){
            //GetObj("Radio6").checked = true;
            GetObj("datetype").value = dateformat;
            showArea_18();
        }else{
            //GetObj("Radio6").checked = false;
        }

        //商品类别
        /*var categorytype = "<%=CategoryType %>";
        var caegoryObj = document.getElementsByName("c_type_1");
        switch(categorytype){
            case "0":
                caegoryObj[0].checked = true;
                GetObj("cateindex").value = "<%=CategoryIndex %>";
                showArea_1();
                break;
            case "":
                caegoryObj[2].checked = true;
                showArea_0();
                break;
            default:
                caegoryObj[1].checked = true;
                BindSelect("category", "<%=CategoryType %>");
                showArea_2();
                break;
        }*/
        //商品类型
        /*var typeindex = "<%=TypeIndex %>";
        switch(typeindex){
            case "":
                //GetObj("Radio1").checked = false;
                if(labletype == 1)
                    showArea_11();
                break;
            default:
                //GetObj("Radio1").checked = true;
                if(labletype == 2)
                    showArea_11();
                BindSelect("typeindex", typeindex);
                break;
        }
        //发布时间
        var productdate = "<%=ProductDate %>";
        switch(productdate){
            case "":
                GetObj("Radio2").checked = false;
                break;
            default:
                GetObj("Radio2").checked = true;
                showArea_12();
                GetObj("daynum").value = productdate;
                break;
        }
        //分页样式
        var pagestyle = "<%=PageSyle %>";
        switch(count){
            case "":
                if(pagestyle != ""){
                    GetObj("Radio5").checked = true;
                    showArea_44();
                    GetObj("pagecount").value = "<%=Count %>";
                    BindSelect("pagestyle", pagestyle);
                }else{
                    GetObj("countnum").value = "<%=Count %>";
                }
                break;
            default:
                GetObj("type_5").checked = true;
                showArea_4();
                GetObj("start_count").value = count;
                GetObj("end_count").value = "<%=Count %>";
                break;
        }*/
        //商品数量
        var count = "<%=StartNum %>";
        //新窗口打开
        var isnewwindow = "<%=IsNewWindow %>";
        //if(isnewwindow == "")
            //GetObj("Checkbox2").checked = false;
    }
    
    function BindSelect(id, value){
        var obj = document.getElementById(id);
        for(var i=0;i<obj.length;i++){
            if(obj[i].value == value){
                obj[i].selected = true;
            }
        }
    }
    
    function BindObjByName(s, value){
        var obj = document.getElementsByName(s);
        for(var i=0;i<obj.length;i++){
            if(obj[i].value == value){
                obj[i].checked = true;
                eval(value + "_Click()");
            }
        }
    }
    
    function BindWidth(length){
        var Array = length.split("*");
        GetObj("imgwidth").value = Array[0];
        GetObj("imgheight").value = Array[1];
    }
</script>
    </div>
    </form>
</body>
</html>