<%
 //----------------------------------------------------------------
 //文件名称：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">
		  <td><div id="toparea_14" style="background:#666666" align="center"><a href="javascript:showtab(14);"><font color="#FFFFFF">捆绑促销</font></a></div></td>
		  <td><div id="toparea_15" style="background:#666666" align="center"><a href="javascript:showtab(15);"><font color="#FFFFFF">促销活动</font></a></div></td>
		  <td><div id="toparea_16" style="background:#666666" align="center"><a href="javascript:showtab(16);"><font color="#FFFFFF">网友评价</font></a></div></td>		  
		  <td><div id="toparea_17" style="background:#666666" align="center"><a href="javascript:showtab(17);"><font color="#FFFFFF">购买咨询</font></a></div></td>
	  </tr>
	</table>
	
	<input type="hidden" id="LableTag" value="1" />
	<input type="hidden" id="TagName" value="readmalls" />
	<input type="hidden" id="proValue" value="<style type=text/css> .zdysx { background:#F2FAFF; border:1px #E2F1FF solid; padding:5px 0 0; margin-bottom:20px} .zdysx ul { margin:0; padding:0; list-style:none} .zdysx ul li { margin:0 0 4px 4px; padding:0; background:#E2F1FF; border:1px #FFF solid; width:236px; height:33px; line-height:33px; font-size:14px; color:#555; float:left; text-align:left;} .zdysx ul li span { color:#2A68A3; font-size:14px} </style> <div class=zdysx>   <ul>     <#loop propertysearch,[+cid+] 999#>     <li>{propertysearch[name]}：<span>{propertysearch[value]}</span></li>     <#/loop#>      <#loop selfpropertysearch,[+cid+] 999#>     <li>{selfpropertysearch[name]}：<span>{selfpropertysearch[value]}</span></li>     <#/loop#>   </ul>   <div style=clear:both></div> </div>" />
	<input type="hidden" id="bindValue" value="<div class='binder'><ul><#loop bindingsalesearch,['+cid+'] 5#><li><h1><img src='images/others/binderimg.gif' align='absmiddle' />{bindingsalesearch[bindingname]}</h1><div><ul><#loop bindingproductbybindingid,['+bindingsalesearch_member['bindingid'].ToString()+'] 100#> <#if bindingproductbybindingid__loop__id != 1#><li class='plu'><img src='images/others/plusimg.gif' /></li><#/if#><li><strong><a href='[$syspath]product.aspx?id={bindingproductbybindingid[id]}' target='_blank'><img src='[$syspath]{bindingproductbybindingid[srcdetail]}' /></a></strong><br /><a href='[$syspath]product.aspx?id={bindingproductbybindingid[id]}' target='_blank'>{bindingproductbybindingid[name]}</a> X {bindingproductbybindingid[productcount]}<br /><b>￥{bindingproductbybindingid[memberprice]}</b></li><#/loop#></ul><span>捆绑价：<strong>￥{bindingsalesearch[memberprice]}</strong><br />原 价：<s>￥{bindingsalesearch[marketprice]}</s><br />节 省：<b>￥{bindingsalesearch[giftprice]}</b><br /><a href='[$syspath]cart.aspx?act=buy&bindingid={bindingsalesearch[bindingid]}'><img src='images/others/buykey.gif' /></a></span></div></li><#/loop#></ul></div><br />" />
    <input type="hidden" id="actValue" value="<style type='text/css'>.proact {padding:10px 0;}.actunit {color:#000000;float:left;padding:0 2px;text-align:center;width:304px !important;}.actunit1 {height:10px;}.actunit2 {background:url('images/products/actunitbg.gif') repeat scroll 0 0 transparent;padding:1px 0;}.actunit3 {background:none repeat scroll 0 0 #666666;color:#FFFFFF;height:25px;line-height:25px;padding:0 10px;text-align:left;width:284px !important;}.actunit4 {background:none repeat scroll 0 0 #FFFFFF;line-height:20px;padding:5px 0;}.actunit a:visited {color:#666666;}.actunit a:link {color:#666666;}.actunit a:hover {color:#FF6600;text-decoration:none;}.actinfo {background:none repeat scroll 0 0 #EDEDED;color:#000000;float:right;padding:5px;text-align:left;width:400px !important;}</style><div class='right'><#loop productactsearch,['+cid+'],* 999#><div class='proact'><div class='actunit'>  <div class='actunit1'><img src='images/products/actunitbgt.gif'></div>  <div class='actunit2'><a href='[$syspath]act.aspx?id={productactsearch[ID]}' target='_blank'><img width='262' height='100' border='0' src='{gettmpimg({productactsearch[srclist]},262,100)}'></a></div>  <div class='actunit3'>{productactsearch[Name]}[ {productactsearch[StartDate]} ~ {productactsearch[EndDate]} ]</div>  <div class='actunit4'><div align='left'><strong> 适用对象：</strong>　{productactsearch[UserGroupName]}<br />  <strong>活动状态：</strong>　 <span name='web_ActiveState' id='web_ActiveState'><#if {productactsearch[IsFinish]} == '1'#>活动已结束<#/if#><#if {productactsearch[IsFinish]} == '0'#>活动进行中<#/if#>  </span></div>  </div></div><div class='actinfo'><strong>活动内容：</strong>{LeftNoHTML({productactsearch[Content]},200)}</div><br clear='all'>  </div><#/loop#></div>" />
    <input type="hidden" id="reviewValue" value="<style type='text/css'>ul, ol {list-style-image:none;list-style-position:outside;list-style-type:none;}.PR_list {margin:0;padding:0;margin-bottom:25px;overflow:hidden;padding-left:0;list-style-image:none;list-style-position:outside;list-style-type:none;width:728px;background:#F8FBFF;border:1px #D1E2F3 solid;}.PR_list_l {float:left;overflow:hidden;text-align:center;width:100px;padding:5px}.PR_list_r {float:left;overflow:hidden;width:610px;}div.re_topic {background:#F8FBFF url(../../template/public/images/products/w_dot_3.gif) repeat-x scroll 0 top;color:#9C9A9D;padding:4px 10px 1px;}div.re_con {background:transparent url(../../template/public/images/products/w_dot_3.gif) repeat-x scroll 0 top;padding:10px 10px 5px;}.float_Right {float:right;}span.topic {font-weight:bold;}a.link_1:link, a.link_1:visited {color:#005AA0;}div.re_con {background:transparent url(../../template/public/images/products/w_dot_3.gif) repeat-x scroll 0 top;padding:10px 10px 5px;}.PR_list_r div {overflow:hidden;width:600px;}div.re_con_buttons {color:#9C9A9D;padding:5px 0 0;}div.re_con_buttons .btn1 {background:transparent url(../../template/public/images/products/button_bg1.gif) repeat scroll 0 0;border:0 none;cursor:pointer;font-size:12px;height:22px;width:60px;}div.re2 {background:transparent url(../../template/public/images/products/w_dot_3.gif) repeat-x scroll 0 top;padding:5px 10px;}div.re2 em {color:#CCCCCC;display:block;float:left;font-family:arial;font-size:20px;font-style:italic;height:36px;line-height:36px;text-align:center;width:60px;margin:0;}div.re2 ul {float:right;width:514px;margin:0;}.PR_list_r div {overflow:hidden;width:600px;}.refer_info {background:transparent url(../../template/public/images/products/w_dot_3.gif) repeat-x scroll 0 top;padding:10px 10px 0;}.refer_info em {color:#FF7403;font-weight:bold;padding:0 5px;}a.link_1:link, a.link_1:visited {color:#005AA0;text-decoration:none;}a.link_FF7403:link, a.link_FF7403:visited {color:#FF7403;text-decoration:none;}</style><div class='right'><#loop productreview,['+cid+'],* 10#><ul class='PR_list'>	<#loop usergroup,['+productreview_member['username'].ToString()+'] 10#><li name='chinaxiaecho' class='PR_list_l'><img src='{gettmpimg({usergroup[ico]},55,55)}' width='55' height='55'>  <div>{productreview[username]}</div>  <div>{usergroup[name]}</div></li><#/loop#><li class='PR_list_r'>  <div class='re_topic'>  	<span class='float_Right'>{productreview[date]}</span> <span class='topic'><a href='javascript:void(0);' class='link_1'>{productreview[title]}</a></span><img src='../../template/public/images/products/star{productreview[star]}.gif' width='72' height='12'>  </div>  <div class='re_con'><div>{productreview[content]}</div><div class='re_con_buttons'><span id='spanproductreview_{productreview[id]}' class='float_Right'>这条评价对您有用吗？&nbsp;  <button id='agree_{productreview[id]}' class='btn1' name='agree' onclick='javascript:ProductViewPlease('goodcount',{productreview[id]})' title='0'> 有用[{productreview[goodcount]}]</button>  &nbsp;  <button id='oppose_{productreview[id]}' class='btn1' name='oppose' onclick='javascript:ProductViewPlease('badcount',{productreview[id]})' title='0'>没用[{productreview[badcount]}]</button>  </span>  <button id='btnreviewto_{productreview[id]}' class='btn1' onclick='ProductReviewToPage({cid},{productreview[id]})'> 回复[{productreview[reviewcount]}]</button>  &nbsp;&nbsp;购买日期：{productreview[date]}</div>  </div>  <#if {productreview[remark]} != ''#><b style='padding-left:10px'>商城回复：</b><font style='font-size: 12px'>{productreview[remark]}</font>  <#/if#>  <#loop productreviewto,['+productreview_member['id'].ToString()+'] 999#><div class='re2'>			<em>{productreviewto__loop__id}<font style='font-size: 12px; font-style: normal;'>楼</font></em>			<ul>				<li>					<span class='float_Right'><span style='color: rgb(0, 0, 0);'><#loop usergroup,['+productreview_member['username'].ToString()+'] 10#>{usergroup[name]}<#/loop#></span>{productreviewto[date]}</span>					<a class='link_1' href='javascript:void(0);'>{productreviewto[username]}</a> 回复说:				</li>				<li class='re2_con'>{productreviewto[content]}</li>			</ul>		</div>  <#/loop#></li></ul><#/loop#><div class='refer_info'>	<span class='float_Right'>共<em>{reviewcount}</em>条<a target='_blank' class='link_1' href='[$syspath]productreview.aspx?id={cid}'>浏览所有用户评价>></a></span><div id='ProductReview' style='float:left;'>Loading……</div></div><script language='javascript' type='text/javascript'>//加载发表评论window.addEvent('domready', function(){if($('ProductReview')){$('ProductReview').load('[$syspath]member/AjaxRequest.aspx?Command=ProductReview&proID={cid}&d=' + Date());}});</script></div>" />
    <input type="hidden" id="askValue" value="<style type='text/css'>dl, dt, dd {margin:0;padding:0;}.refer {margin-bottom:10px;padding:8px 15px;}.refer .r_info {color:#999999;padding-right:5px;text-align:right;}.refer dl {margin-bottom:5px;overflow:hidden;width:731px;}.ask dt {background:transparent url(../../template/public/images/products/refer_item_03.gif) no-repeat scroll 0 2px;padding-left:17px;}.refer dl {margin-bottom:5px;overflow:hidden;width:731px;}.refer dd {width:490px;}.refer dt, .refer dd {float:left;}.answer {color:#D75509;}.answer dt {background:transparent url(../../template/public/images/products/refer_item_06.gif) no-repeat scroll 0 2px;padding-left:17px;}.refer dd.an_time {color:#999999;text-align:right;width:130px;}a.link_1:link, a.link_1:visited {color:#005AA0;}.refer_bg {background:#F4F9FF none repeat scroll 0 0;border:1px solid #EDF0F1;}.refer dd.an_time {color:#999999;text-align:right;width:130px;}em {font-style:normal;}</style><div><#loop productask,['+cid+'] 10#><div class='refer<#if productask__loop__id % 2 == 1#>		refer_bg<#/if#>'>  <div class='r_info'>网友：{productask[username]}<em name='796299757_704737903' id='level'><em style='color: rgb(153, 153, 153);'>  <#if {productask[username]} != ''#>  注册会员  <#else#>  未注册会员  <#/if#>  </em></em>{productask[date]}</div>  <dl class='ask'><dt>咨询内容：</dt><dd>{productask[content]}</dd>  </dl>  <dl class='answer'><dt>管理回复：</dt><dd>{productask[remark]}</dd><dd class='an_time'>{productask[remarkdate]}</dd>  </dl>  <div class='r_info' id='3694916_{productask[id]}'>您对我们的回复：  <a class='link_1' href='javascript:void(0)' name='2' onclick='javascript:Pleased({productask[id]},'Pleased')'>满意</a>  (<span>  {productask[Pleased]}  </span>)  <a href='javascript:void(0)' class='link_1' onclick='javascript:Pleased({productask[id]},'Displeased')' name='4'>不满意</a>  (<span>  {productask[Displeased]}  </span>)  </div></div><#/loop#><div style='float:right;'><a href='[$syspath]productask.aspx?id={cid}' target='_blank'>查看更多咨询内容</a></div></div>" />
    <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="noneSet">
                <td align="center" class="hback" colspan="2" height="26px">
                    该标签没有需要设置的特殊属性</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 = "btnAct";
                        listshow="out_type,s_type_3,s_type_7,Need_1,Tr4,Tr5,OpenModel,Tr1,Tr2,btnMall"
                        GetObj("TagName").value = "mallviewnext";
                        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 = "s_type_3,Need_1,Tr1,Tr2,Tr4,Tr5,OpenModel,s_type_7,out_type";
                        listshow="";
                        GetObj("TagName").value = "property";
                        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;
                    case 14:
                        listhidden = "s_type_3,Need_1,Tr1,Tr2,Tr4,Tr5,OpenModel,s_type_7,out_type";
                        listshow="";
                        GetObj("TagName").value = "bind"; 
                        break;               
                    case 15:
                        listhidden = "s_type_3,Need_1,Tr1,Tr2,Tr4,Tr5,OpenModel,s_type_7,out_type";
                        listshow="";
                        GetObj("TagName").value = "act";
                        break;                      
                    case 16:
                        listhidden = "s_type_3,Need_1,Tr1,Tr2,Tr4,Tr5,OpenModel,s_type_7,out_type";
                        listshow="";
                        GetObj("TagName").value = "review";
                        break;
                    case 17:
                        listhidden = "s_type_3,Need_1,Tr1,Tr2,Tr4,Tr5,OpenModel,s_type_7,out_type";
                        listshow="";
                        GetObj("TagName").value = "ask";   
                        break;                    
                }
                //全部初始化
                for(var i=1;i<=17;i++){
                    try{
                        document.getElementById("toparea_" + i).style.backgroundColor = '#666';}
                    catch(e){}
                }
                //背景变化
                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(tagname=="property")
                    tempstr = GetObj("proValue").value;
                
                if(tagname=="bind")
                    tempstr = GetObj("bindValue").value;

                if(tagname=="act")
                    tempstr = GetObj("actValue").value;
                    
                if(tagname=="review")
                    tempstr = GetObj("reviewValue").value;
                    
                if(tagname=="ask")
                    tempstr = GetObj("askValue").value;
                                                                                                                  
                //返回
                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>