<tr>            
	<td class=tablerowl width=20%>添加相关内容分组</td>
	<td class=tablerow>
		<script type="text/javascript">
		Pager.prototype.goPrePage = function(){
			this.CurrentPage = Math.max(this.CurrentPage - 1, 1);
			qmeCms.related.get(this.CurrentPage);
		}
		Pager.prototype.goNextPage = function(){
			this.CurrentPage = Math.min(this.CurrentPage + 1, this.Total);
			qmeCms.related.get(this.CurrentPage);
		}
		Pager.prototype.goPage = function(p){
			this.CurrentPage = p;
			qmeCms.related.get(this.CurrentPage);
		}
		</script>
		<input type="button" class="f-button" value=" 添加相关内容分组 " onclick="qmeCms.related.template();" />
		<textarea id="template-related" style="display:none;">
			<table border="0" id="related_#id#" width="100%" cellpadding="0" cellspacing="0">
				<tbody><tr>
					<td width="240" valign="top" style="vertical-align:top">
						<p style="text-align:right;padding-top:5px;vertical-align:top">名称：<input type="text" value="" id="related_#id#_subject" name="related[subject][#id#]" style="width:180px;" class="f-text" /></p>
						<p style="text-align:right;padding-top:5px;vertical-align:top">排序：<input type="text" value="" id="related_#id#_ordering" name="related[ordering][#id#]" style="width:180px;" class="f-text" /></p>
						<p style="text-align:right;padding-top:5px;vertical-align:top">
							<input type="hidden" value="#aid#" id="related_#id#_aid" name="related[aid][#id#]" />
							<input type="button" value=" 删除分组 " class="f-button" onclick="qmeCms.related.removeTemplate(#id#);" />
							<input type="button" value=" 选择内容 " class="f-button" onclick="qmeCms.related.init('#id#', '{$mod}', {$channelid}, 0, 1);" />
						</p>
					</td>
					<td valign="top" style="vertical-align:top">
						<table  id="related_#id#_data" border="0" width="100%"  class="tableborder rmove" cellpadding="0" cellspacing="0"><tbody>
							<tr>
								<th width="60">频道</th>
								<th width="60">ID</th>
								<th>标题</th>
								<th width="80">操作</th>
							</tr>
						</tbody></table>
					</td>
				</tr></tbody>
			</table>
		</textarea>
	</td>          
</tr>
<tr>
	<td class="tablerow" colspan=2>
		<div class="related" id="related">

		</div>
	</td>
</tr>
<script type="text/javascript">
<!--{if $action == 'add'}-->
qmeCms.related.template();
<!--{else}-->
qmeCms.related.modify('{$_output['id']}','{$_output['channelid']}', {$related_json});
<!--{/if}-->
</script>