<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Template_Lable_Activity_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;}
    </style>
    <script language="javascript">
        window.status="活动列表标签创建";
    </script>
    <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; background-color:#fff" onclick="showHiddenField(1, this)"><strong style="font-size:14px; color:#000">【固定列表创建】</strong></div>
                
                <div id="tab2" style="float:left; padding-left:20px; cursor:pointer" onclick="showHiddenField(2, this)"><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 id="Area_1" class="OperateTable" width="100%" height="100" border="0" align=center cellpadding="0" cellspacing="0" class="table" 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>
                <input type="radio" class="radio" name="c_type_2" value="1" id="type_5" onclick="showArea_4()" /><label for="type_5">从中间开始取</label>
                <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="s_type_44" style="display:none;">
            <td align="center" class="hback" ><div align="left"></div></td>
            <td class="hback" >
                每页数量
                <input type="text" id="pagecount" size="2" value="20" onchange="return checkNum('start_count', 1)" />
                分页样式
                <select id="pagestyle">
                    <option value="1">默认样式</option>
                    <option value="2">样式1</option>
                    <option value="3">样式2</option>
                </select>
            </td>
        </tr>
        <tr>
            <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>
            <td align="center" class="hback" ><div align="left"><b>循环时调用的活动样式：</b></div></td>
            <td 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', 'hs')"/>
            </td>
        </tr>
        <tr>
            <td align="center" class="hback" ></td>
            <td class="hback" >
                <input type="checkbox" class="checkbox" name="c_type_11" value="0" id="Radio11" onclick="showArea_20()" /><label for="Radio11">调用活动下关联的商品</label>
            </td>
        </tr>
        <tr id="Tr11" style="display:none;"> 
            <td align="center" class="hback" ><div align="left"><b>活动下的商品样式：</b></div></td>
            <td class="hback" >
                <select id="mallid"  name="ProductStyle" style="width:200px;">
                    <asp:Repeater ID="Repeater1" runat="server">
                        <ItemTemplate>
                            <option value="<%#Eval("Name") %>"><%#Eval("Name") %></option>
                        </ItemTemplate>
                    </asp:Repeater>
                </select> 
                <input type="button" value="查看选中样式" class="button" onclick="GetSelectedLabelView('mallid', 'ms')"/>
            </td>
        </tr>
        
        <tr>
            <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()" /><label for="Radio3">标题长度</label>
                <input type="checkbox" class="checkbox" name="c_type_6" value="1" id="Radio4" onclick="showArea_16()" /><label for="Radio4">简介长度</label>
                <input type="checkbox" class="checkbox" name="c_type_6" value="2" id="Radio6" onclick="showArea_18()" /><label for="Radio6">日期格式</label>
                <input type="checkbox" class="checkbox" name="c_type_6" value="3" id="Checkbox1" checked="checked" onclick="showArea_19()" /><label for="Checkbox1">图片尺寸</label>
                <input type="checkbox" class="checkbox" name="c_type_6" value="3" id="Checkbox2" checked="checked" /><label for="Checkbox2">新窗口打开</label>
            </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>
            <td align="center" class="hback" ><div align="left"><b>活动排序条件：</b></div></td>
            <td class="hback" >
                按
                <select id="orderfield">
                    <option value="Date">添加时间</option>
                    <option value="StartDate">开始时间</option>
                    <option value="EndDate">结束时间</option>
                </select>
                来排序
                &nbsp;&nbsp;
                排序方向是
                <select id="orderdirection">
                    <option value="ASC">正序</option>
                    <option value="DESC">逆序</option>
                </select>
            </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">
    var height = 560;
    var labletype = 1;
    
    function showHiddenField(number, obj){
        if(number == 1){
            //终极分页切换
            GetObj("pageinfo").style.display = "none";
            GetObj("type_4").checked = true;
            showArea_3();
            //头部TAB切换
            GetObj("tab1").style.backgroundColor = "#fff";
            GetObj("tab2").style.backgroundColor = "";
            
            height = 660;
            labletype = number;
        }else if(number == 2){
            //终极分页切换
            GetObj("pageinfo").style.display = "";
            GetObj("Radio5").checked = true;
            showArea_44();
            //头部TAB切换
            GetObj("tab1").style.backgroundColor = "";
            GetObj("tab2").style.backgroundColor = "#fff";
            
            height = 540;
            labletype = number;
        }       
        window.dialogHeight = height + "px";
        InitTrClassById("Area_1");
    }
    
    <%=LabelType %>
    
    function InitNewTrClass(){
        InitTrClassById("Area_1");
    }

    function InitValue(form1){
        var tempstr = "{Web:HS=Activity";
        if(labletype == 2)
            tempstr = "{Web:HS=ActivityList";
        //活动数量限制
        var counttype = GetObjValueByName("c_type_2");
        switch(counttype){
            case "0":
                tempstr += "┆Loop$" + GetObj("countnum").value;
                break;
            case "1":
                tempstr += "┆Loop$" + GetObj("end_count").value + "┆活动开始序号$" + GetObj("start_count").value;
                break;
            case "2":
                tempstr += "┆Loop$" + GetObj("pagecount").value + "┆分页样式$" + GetObj("pagestyle").value;
                break;
        }
        //输出格式判断
        var outtype = GetObjValueByName("c_type_3");
        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;
        }
        //循环的样式
        tempstr += "┆引用样式$" + GetObj("styleid").value;
        //活动下的商品样式
        if(GetObj("Radio11").checked == true)
            tempstr += "┆商品引用样式$" + GetObj("mallid").value;
        //标题长度
        if(GetObj("Radio3").checked == true)
            tempstr += "┆标题数$" + GetObj("titlecount").value;
        //简介长度
        if(GetObj("Radio4").checked == true)
            tempstr += "┆简介长度$" + GetObj("markcount").value;
        //日期格式
        if(GetObj("Radio6").checked == true)
            tempstr += "┆日期格式$" + GetObj("datetype").value;
        //图片尺寸
        if(GetObj("Checkbox1").checked == true)
            tempstr += "┆缩略图宽高$" + GetObj("imgwidth").value + "*" + GetObj("imgheight").value;
        //排序字段 
        tempstr += "┆排列字段$" + GetObj("orderfield").value;
        //排序方向
        tempstr += "┆排列方式$" + GetObj("orderdirection").value;
        //展示效果
        var showtype = GetObjValueByName("c_type_7");
        switch(showtype){
            case "默认滚动":
                tempstr += "┆展示效果$默认滚动┆滚动方向$" + GetObj("marquee").value + "┆滚动速度$" + GetObj("speed").value + "┆滚动高度$" + GetObj("marqueeheight").value;
                break;
            case "定时滚动":
                tempstr += "┆展示效果$定时滚动┆JS滚动间隔$" + GetObj("waitnum").value + "┆JS滚动高度$" + GetObj("heightnum").value;
                break;
            case "手动滚动":
                tempstr += "┆展示效果$手动滚动┆JS滚动宽度$" + GetObj("widthnum").value;
                break;
        }
        //是否新窗口打开
        if(GetObj("Checkbox2").checked == true)
            tempstr += "┆打开窗口$1";
        
        //结束符号
        tempstr += "}";
        //返回
        if (navigator.appVersion.indexOf("MSIE") == -1){
            window.opener.returnAction(tempstr);
            window.close();
        }else{
            window.returnValue = tempstr;
            window.close();
        }
    }
    
    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 GetObj(s){
        return document.getElementById(s);
    }
        
    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 IsDisabled(oName){
        if(GetObj(oName) == true){
            return true;
        }else{
            return false;
        }
    }
    
    function showArea_1(){
        if(document.getElementById('s_type_1').style.display == 'none' && document.getElementById('s_type_2').style.display == 'none')
            height += 41;
        HiddenField_1();
        document.getElementById('s_type_1').style.display='';
        InitNewTrClass();
        window.dialogHeight = height + "px";
    }
    
    function showArea_2(){
        if(document.getElementById('s_type_1').style.display == 'none' && document.getElementById('s_type_2').style.display == 'none')
            height += 41;
        HiddenField_1();
        document.getElementById('s_type_2').style.display='';
        InitNewTrClass();
        window.dialogHeight = height + "px";
    }
    
    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 showArea_44(){
        HiddenField_2();
        document.getElementById('s_type_44').style.display='';
        InitNewTrClass();
    }
    
    function showArea_5(){
        HiddenField_2();
        InitNewTrClass();
    }
    
    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 showArea_11(){
        document.getElementById('s_type_11').style.display = document.getElementById('s_type_11').style.display == '' ? 'none' : '';
        if(document.getElementById('s_type_11').style.display == '')
            height += 41;
        else
            height -= 41;
        InitNewTrClass();
        window.dialogHeight = height + "px";
    }
    
    function showArea_12(){
        document.getElementById('s_type_12').style.display = document.getElementById('s_type_12').style.display == '' ? 'none' : '';
        if(document.getElementById('s_type_12').style.display == '')
            height += 41;
        else
            height -= 41;
        InitNewTrClass();
        window.dialogHeight = height + "px";
    }
    
    function showArea_13(){
        document.getElementById('s_type_13').style.display = '';
        InitNewTrClass();
    }
    
    function showArea_14(){
        document.getElementById('s_type_13').style.display ='none';
        InitNewTrClass();
    }
    
    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 默认滚动_Click(){
        if(document.getElementById('Tr6').style.display == 'none' && document.getElementById('Tr7').style.display == 'none' && document.getElementById('Tr8').style.display == 'none')
            height += 41;
        HiddenField_5();
        document.getElementById('Tr6').style.display = document.getElementById('Tr6').style.display == '' ? 'none' : '';
        InitNewTrClass();
        window.dialogHeight = height + "px";
    }
    function 定时滚动_Click(){
        if(document.getElementById('Tr6').style.display == 'none' && document.getElementById('Tr7').style.display == 'none' && document.getElementById('Tr8').style.display == 'none')
            height += 41;
        HiddenField_5();
        document.getElementById('Tr7').style.display = document.getElementById('Tr7').style.display == '' ? 'none' : '';
        InitNewTrClass();
        window.dialogHeight = height + "px";
    }
    function 手动滚动_Click(){
        if(document.getElementById('Tr6').style.display == 'none' && document.getElementById('Tr7').style.display == 'none' && document.getElementById('Tr8').style.display == 'none')
            height += 41;
        HiddenField_5();
        document.getElementById('Tr8').style.display = document.getElementById('Tr8').style.display == '' ? 'none' : '';
        InitNewTrClass();
        window.dialogHeight = height + "px";
    }
    function _Click(){
        if(document.getElementById('Tr6').style.display == '' || document.getElementById('Tr7').style.display == '' || document.getElementById('Tr8').style.display == '')
            height -= 41;
        HiddenField_5();
        InitNewTrClass();
        window.dialogHeight = height + "px";
    }
    
    function showArea_0(){
        if(document.getElementById('s_type_1').style.display == '' || document.getElementById('s_type_2').style.display == '')
            height -= 41;
        HiddenField_1();
        InitNewTrClass();
        window.dialogHeight = height + "px";
    }
    
    function showArea_20(){
        document.getElementById('Tr11').style.display = document.getElementById('Tr11').style.display == '' ? 'none' : '';
        if(document.getElementById('Tr11').style.display == '')
            height += 41;
        else
            height -= 41;
        InitNewTrClass();
        window.dialogHeight = height + "px";
    }
    
    function HiddenField_1(){
        document.getElementById('s_type_1').style.display='none';
        document.getElementById('s_type_2').style.display='none';
    }
    
    function HiddenField_2(){
        document.getElementById('s_type_3').style.display='none';
        document.getElementById('s_type_4').style.display='none';
        document.getElementById('s_type_44').style.display='none';
    }
    
    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 HiddenField_4(){
        document.getElementById('s_type_11').style.display='none';
    }
    function HiddenField_5(){
        document.getElementById('Tr6').style.display='none';
        document.getElementById('Tr7').style.display='none';
        document.getElementById('Tr8').style.display='none';
    }
</script>
    <script language="javascript" type="text/javascript">
    InitData();
    
    function InitData(){
        //输出格式
        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("orderfield", "<%=OrderField %>");
        BindSelect("orderdirection", "<%=OrderDirection %>");
        //图片尺寸
        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;
            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;
        }
        //JS特效
        var jsviewtype = "<%=JsViewType %>";
        BindObjByName("c_type_7", jsviewtype);
        switch(jsviewtype){
            case "默认滚动":
                GetObj("speed").value = "<%=MarqueeSpeed %>";
                BindSelect("marquee", "<%=Marquee %>");
                GetObj("marqueeheight").value = "<%=MarqueeHeight %>";
                break;
            case "定时滚动":
                GetObj("waitnum").value = "<%=WaitNum %>";
                GetObj("heightnum").value = "<%=HeightNum %>";
                break;
            case "手动滚动":
                GetObj("widthnum").value = "<%=WidthNum %>";
                break;
            default:
                break;
        }
        //活动数量
        var count = "<%=StartNum %>";
        //分页样式
        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 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>
    </form>
</body>
</html>
