<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Template_Lable_Public_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">
<!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">
    <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 type="text/css">
        .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 width="24%">
                        <div id="toparea_13" style="background: #666666;" align="center">
                            <a href="javascript:showtab(13);"><font color="#FFFFFF">留言列表</font></a></div>
                    </td>
                    <td width="24%">
                        <div id="toparea_6" style="background: #666666;" align="center">
                            <a href="javascript:showtab(6);"><font color="#FFFFFF">商品搜索关键字</font></a></div>
                    </td>
                    <td width="24%">
                        <div id="toparea_7" style="background: #666666;" align="center">
                            <a href="javascript:showtab(7);"><font color="#FFFFFF">文章搜索关键字</font></a></div>
                    </td>
                    <td width="24%">
                        <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 width="24%">
                        <div id="toparea_9" style="background: #666666;" align="center">
                            <a href="javascript:showtab(9);"><font color="#FFFFFF">商城信息常规</font></a></div>
                    </td>
                    <td width="24%">
                        <div id="toparea_10" style="background: #666666;" align="center">
                            <a href="javascript:showtab(10);"><font color="#FFFFFF">帮助类别</font></a></div>
                    </td>
                    <td width="24%">
                        <div id="toparea_16" style="background: #666666;" align="center">
                            <a href="javascript:showtab(16);"><font color="#FFFFFF">帮助类别常规</font></a></div>
                    </td>
                    <td width="24%">
                        <div id="toparea_11" style="background: #666666;" align="center">
                            <a href="javascript:showtab(11);"><font color="#FFFFFF">帮助列表</font></a></div>
                    </td>
                </tr>
                <tr class="hback">
                    <td width="24%">
                        <div id="toparea_12" style="background: #666666;" align="center">
                            <a href="javascript:showtab(12);"><font color="#FFFFFF">帮助常规</font></a></div>
                    </td>
                    <td width="24%">
                        <div id="toparea_5" style="background: #666666;" align="center">
                            <a href="javascript:showtab(5);"><font color="#FFFFFF">在线交流工具</font></a></div>
                    </td>
                    <td width="24%">
                        <div id="toparea_14" style="background: #666666;" align="center">
                            <a href="javascript:showtab(14);"><font color="#FFFFFF">客服通浮动</font></a></div>
                    </td>
                    <td width="24%">
                        <div id="toparea_15" style="background: #666666;" align="center">
                            <a href="javascript:showtab(15);"><font color="#FFFFFF">客服通按钮</font></a></div>
                    </td>
                </tr>
                <tr class="hback">
                    <td width="24%">
                        <div id="toparea_17" style="background: #666666;" align="center">
                            <a href="javascript:showtab(17);"><font color="#FFFFFF">会员登陆</font></a></div>
                    </td>
                    <td width="24%">
                        <div id="toparea_18" style="background: #666666;" align="center">
                            <a href="javascript:showtab(18);"><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="Need_3">
                        <td align="center" class="hback">
                            <div align="left">
                                <b>数量限制：</b></div>
                        </td>
                        <td class="hback">
                            <input type="radio" class="radio" name="c_type_2" value="0" id="type_4" onclick="showArea_3()"
                                checked="checked" /><label for="type_4">从头开始取</label>
                            <span style="display: none">
                                <input type="radio" class="radio" name="c_type_2" value="1" id="type_5" onclick="showArea_4()" /><label
                                    for="type_5">从中间开始取</label></span> <span id="pageinfo" style="display: none;">
                                        <input type="radio" class="radio" name="c_type_2" value="2" id="Radio5" onclick="showArea_44()" /><label
                                            for="Radio5">按分页来取</label></span>
                        </td>
                    </tr>
                    <tr id="s_type_3">
                        <td align="center" class="hback">
                            <div align="left">
                            </div>
                        </td>
                        <td class="hback">
                            您想要调用
                            <input type="text" id="countnum" size="2" value="10" onchange="return checkNum('countnum', 1)" />
                            个
                        </td>
                    </tr>
                    <tr id="s_type_4" style="display: none;">
                        <td align="center" class="hback">
                            <div align="left">
                            </div>
                        </td>
                        <td class="hback">
                            您想要从第
                            <input type="text" id="start_count" size="2" value="1" onchange="return checkNum('start_count', 1)" />
                            个开调用后面的
                            <input type="text" id="end_count" size="2" value="2" onchange="return checkNum('end_count', 1)" />
                            个
                        </td>
                    </tr>
                    <tr id="out_type">
                        <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">
                        <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', 'PUB')" />
                        </td>
                    </tr>
                    <tr id="Need_2">
                        <td width="26%" align="center" class="hback">
                            <div align="left">
                                <b>登陆后调用样式：</b></div>
                        </td>
                        <td width="74%" class="hback">
                            <select id="Select1" name="MallsStyle" style="width: 200px;">
                                <asp:Repeater ID="MallsDataOptions" runat="server">
                                    <ItemTemplate>
                                        <option value="<%#Eval("Name") %>">
                                            <%#Eval("Name") %>
                                        </option>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </select>
                            <input type="button" value="查看选中样式" class="button" onclick="GetSelectedLabelView('Select1', 'PUB')" />
                        </td>
                    </tr>
                    <tr id="Tr1">
                        <td align="center" class="hback">
                            <div align="left">
                            </div>
                        </td>
                        <td class="hback">
                            标题长度限制在
                            <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="0" id="Radio3" checked="checked"
                                onclick="showArea_15()" style="display: none" /><label for="Radio3" style="display: none">标题长度</label>
                            <input type="checkbox" class="checkbox" name="c_type_6" value="1" id="Radio4" onclick="showArea_16()"
                                style="display: none" /><label for="Radio4" style="display: none">简介长度</label>
                            <input type="checkbox" class="checkbox" name="c_type_6" value="2" id="Radio6" onclick="showArea_18()"
                                style="display: none" /><label for="Radio6" style="display: none">日期格式</label>
                            <input type="checkbox" class="checkbox" name="c_type_6" value="3" id="Checkbox1"
                                checked="checked" onclick="showArea_19()" style="display: none" /><label for="Checkbox1"
                                    style="display: none">图片尺寸</label>
                            <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 = 423;
            
            function GetObj(id){
                return document.getElementById(id);
            }
            
            function showArea_3(){
                HiddenField_2();
                document.getElementById('s_type_3').style.display='';
                InitNewTrClass();
            }
            
            function showArea_4(){
                HiddenField_2();
                document.getElementById('s_type_4').style.display='';
                InitNewTrClass();
            }
            
            function HiddenField_2(){
                document.getElementById('s_type_3').style.display='none';
                document.getElementById('s_type_4').style.display='none';
            }
            
            function showtab(count){
                var listhidden = "",listshow="";
                switch(count){
                    case 1:
                        listhidden = "Need_2,Tr5,OpenModel";
                        listshow="Need_1,Tr4,out_type,s_type_7,Tr1,Tr2,Need_3,s_type_3"
                        GetObj("TagName").value = "shippingadvice";
                        break;
                    case 2:
                        listhidden = "Need_2,Tr4";
                        listshow="Need_1,out_type,s_type_7,Tr1,Tr2,Need_3,s_type_3,Tr5,OpenModel"
                        GetObj("TagName").value = "imglink";
                        break;
                    case 3:
                        listhidden = "Need_2,Tr5,Tr4";
                        listshow="Need_1,out_type,s_type_7,Tr1,Tr2,Need_3,s_type_3,OpenModel"
                        GetObj("TagName").value = "wordlink";
                        break;
                    case 4:
                        listhidden = "Need_2,Tr5";
                        listshow="Need_1,out_type,s_type_7,Tr1,Tr2,Need_3,s_type_3,OpenModel,Tr4"
                        GetObj("TagName").value = "poll";
                        break;
                    case 5:
                        listhidden = "Need_2,Tr5,Tr1,Tr2,Tr4,OpenModel";
                        listshow="Need_1,out_type,s_type_7,Need_3,s_type_3"
                        GetObj("TagName").value = "onlinetool";
                        break;
                    case 6:
                        listhidden = "Need_2,Tr5,Tr4,Tr2";
                        listshow="Need_1,out_type,s_type_7,Tr1,Need_3,s_type_3,OpenModel"
                        GetObj("TagName").value = "productkey";
                        break;
                    case 7:
                        listhidden = "Need_2,Tr5,Tr4,Tr2";
                        listshow="Need_1,out_type,s_type_7,Tr1,Need_3,s_type_3,OpenModel"
                        GetObj("TagName").value = "articlekey";
                        break;
                    case 8:
                        listhidden = "Need_2,Tr5,Tr4";
                        listshow="Need_1,out_type,s_type_7,Tr1,Need_3,s_type_3,OpenModel,Tr2"
                        GetObj("TagName").value = "infosearch";
                        break;
                    case 9:
                        listhidden = "Need_2,Tr5,OpenModel,Tr2,Need_3,s_type_3,out_type,s_type_7,Tr1";
                        listshow="Need_1,Tr4"
                        GetObj("TagName").value = "infodetail";
                        break;
                    case 10:
                        listhidden = "Need_2,Tr4,Tr5";
                        listshow="Need_1,out_type,s_type_7,Tr1,Need_3,s_type_3,OpenModel,Tr2"
                        GetObj("TagName").value = "helpcate";
                        break;
                    case 11:
                        listhidden = "Need_2,Tr4,Tr5";
                        listshow="Need_1,out_type,s_type_7,Tr1,Need_3,s_type_3,OpenModel,Tr2"
                        GetObj("TagName").value = "helplist";
                        break;
                    case 12:
                        listhidden = "Need_2,Tr5,OpenModel,Tr2,Need_3,s_type_3,out_type,s_type_7,Tr1,Tr4";
                        listshow="Need_1"
                        GetObj("TagName").value = "readhelp";
                        break;
                    case 13:
                        listhidden = "Need_2,Tr5,OpenModel";
                        listshow="Need_1,Tr4,out_type,s_type_7,Tr1,Tr2,Need_3,s_type_3"
                        GetObj("TagName").value = "gbook";
                        break;
                    case 14:
                        listhidden = "Need_1,Need_2,Tr5,OpenModel,Tr2,Need_3,s_type_3,out_type,s_type_7,Tr1,Tr4";
                        listshow="";
                        GetObj("TagName").value = "kft";
                        break;
                    case 15:
                        listhidden = "Need_1,Need_2,Tr5,OpenModel,Tr2,Need_3,s_type_3,out_type,s_type_7,Tr1,Tr4";
                        listshow="";
                        GetObj("TagName").value = "kftbutton";
                        break;
                    case 16:
                        listhidden = "Need_2,Tr5,OpenModel,Tr2,Need_3,s_type_3,out_type,s_type_7,Tr1,Tr4";
                        listshow="Need_1"
                        GetObj("TagName").value = "readhelpcate";
                        break;
                    case 17:
                        listhidden = "Tr5,OpenModel,Tr2,Need_3,s_type_3,out_type,s_type_7,Tr1,Tr4";
                        listshow="Need_1,Need_2"
                        GetObj("TagName").value = "userlogin";
                        break;
                    case 18:
                        listhidden = "Need_1,Need_2,Tr5,OpenModel,Tr2,Need_3,s_type_3,out_type,s_type_7,Tr1,Tr4";
                        listshow=""
                        GetObj("TagName").value = "onlinetoolfloat";
                        break;
                   
                }
               //全部初始化
                for(var i=1;i<=18;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:PUB=" + tagname;
                
                //分类数量限制
                var counttype = GetObjValueByName("c_type_2");
                if(GetObj("s_type_3").style.display != "none")
                {
                    switch(counttype){
                        case "0":
                            tempstr += "┆Loop$" + GetObj("countnum").value;
                            break;
                        case "1":
                            tempstr += "┆Loop$" + GetObj("end_count").value + "┆开始序号$" + GetObj("start_count").value;
                            break;
                    }
                }
                //输出格式判断
                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("Need_1").style.display !="none")
                    tempstr += "┆引用样式$" + GetObj("styleid").value;
                if(GetObj("Need_2").style.display !="none")
                    tempstr += "┆登陆后引用样式$" + GetObj("Select1").value;
                //标题长度
                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(tempstr == "{Web:PUB=kft}"){
                    tempstr = "{Web:PUB=kft┆客服通$1}"
                }
                //判断客服通
                if(tempstr == "{Web:PUB=kftbutton}"){
                    tempstr = "{Web:PUB=kftbutton┆客服通$1}"
                }
                //判断在线交流工具浮动 Mod By 钟登科 2008-12-12
                if(tempstr == "{Web:PUB=onlinetoolfloat}"){
                    tempstr = "{Web:PUB=onlinetoolfloat┆在线交流工具浮动}"
                }
                
                //返回
                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";
            }
            </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;
        }
        //调用样式
        BindSelect("styleid", "<%=StyleName %>");
        BindSelect("Select1", "<%=StyleNameAfter %>");
        //数量判断
        var countnum = "<% = Count %>";
        if("<%=Count %>" != "")
        {
           GetObj("countnum").value = countnum;
        }
        //图片尺寸
        var imglength = "<%=ImgLength %>";
        if("<%=ImgLength %>" != ""){
//            GetObj("Checkbox1").checked = true;
            BindWidth(imglength);
        }else{
//            showArea_19();
//            GetObj("Checkbox1").checked = false;
        }
        //标题长度
        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;
            
        }else{
//              showArea_16();
//            GetObj("Radio4").checked = false;
        }
        //日期格式
        var dateformat = "<%=DateFormat %>";
        if(dateformat != ""){
//            GetObj("Radio6").checked = true;
            GetObj("datetype").value = dateformat;
            
        }else{
//            GetObj("Radio6").checked = false;
//            showArea_18();
        }

        //分类数量
        var count = "<%=StartNum %>";
        //分页样式
        var pagestyle = "<%=PageSyle %>";
        switch(count){
            case "":
                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 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>
