<!--#include file="../ACT.Function.asp"-->
<!--#include file="../Mode/ACT.M.ASP"-->
<!--#include file="../include/ACT.F.ASP"-->
<!--#include file="../../act_inc/ACT.Code.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=ModeName%>内容添加 By Act</title>
<link href="../Images/css1/css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="../../act_inc/Prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="../../act_inc/ActHelp.js"></script>
<script language="JavaScript" type="text/javascript" src="../../editor/fckeditor/fckeditor.js"></script>
<script type='text/javascript' src='../../ACT_INC/WebTime/WdatePicker.js'></script>
</head>
<% 
  Dim FileName,ClassName,ClassID,Title,IntactTitle,Intro,Keywords,author,CopyFrom,Slide,TemplateUrl
  Dim ATT,IStop,ModeID,ModeName,Action,ID,ActCMS_DIY,SavePic,MakeHtml,KeywordArr
  Dim ChangesLink,ArticlePic,rev,Content,Hits,Straction,PicUrl,UpdateTime,ActCMS_DIY2
  ModeID = ACTCMS.ChkNumeric(Request("ModeID"))
  if ModeID=0 or ModeID="" Then ModeID=1
  ActCMS_DIY=Split(AF.ActCMS_DIY_F(ModeID,1,""),"§") 
  ModeName= ACTCMS.ACT_C(ModeID,1) 
  Action=Request.QueryString("Action")
  ID=Request("ID")
	KeywordArr=Split(ActCMS_DIY(4), "-")
	Dim TitleTypeList,i,KeywordsArr,AuthorArr,rs3,GroupID_ACT,Score_ACT
	StrAction = request("Action")
	IF Straction = "edit" Then Straction = "edit"  Else Straction = "add"
	Dim Rs,ShowErr
	Set Rs=server.CreateObject("adodb.recordset") 
	IF Action = "edit" Then
	  If UBound(Split(ActCMS_DIY(2),"-"))=3  Then 
			ActCMS_DIY2=Split(ActCMS_DIY(2),"-")
			SavePic=ActCMS_DIY2(2)
			MakeHtml=ActCMS_DIY2(3)
	  Else
			SavePic=0
			MakeHtml=1
	  End If 


		Rs.OPen "Select * from  "&ACTCMS.ACT_C(ModeID,2)&"  where ID = "& ACTCMS.ChkNumeric(Request.QueryString("ID")) &"",Conn,1,1
		IF Rs.eof Then 
			ShowErr = "<li>数据查询错误</li>"
			Response.Redirect("../Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl="&"&Title=1")
			Response.End
		Else
			ChangesLink=RS("ChangesLink")
			Title=RS("Title")
			rev=RS("rev")
			Slide = Rs("Slide")
			IntactTitle=RS("IntactTitle")
			If RS("Content") <> "" Then Content=Server.HTMLEncode(RS("Content"))
			Intro=RS("Intro")
			Keywords=RS("Keywords")
			author=RS("author")
			CopyFrom=RS("CopyFrom")
			Hits=RS("Hits")
			FileName=RS("FileName")
			PicUrl=RS("PicUrl")
			GroupID_ACT=RS("GroupID_ACT")
			Score_ACT=RS("Score_ACT")
			ATT=RS("ATT")
			IStop=RS("IStop")
			TemplateUrl=RS("TemplateUrl")
			ClassID=RS("ClassID")
			UpdateTime=RS("UpdateTime")
			ArticlePic=RS("ArticlePic")
			Rs.close
		If Not ACTCMS.ACTCMS_QXYZ(ModeID,"3",ClassID) Then   Call Actcms.Alert("对不起，你没有"&ACTCMS.ACT_C(ModeID,1)&"的修改权限","")
		End IF
	Else
	   ATT=0:IStop=0:ArticlePic=0:Slide=0:Hits=0
	   author=session("author")
	   CopyFrom=session("CopyFrom")
	   UpdateTime=Date()

	  If UBound(Split(ActCMS_DIY(2),"-"))=3  Then 
			ActCMS_DIY2=Split(ActCMS_DIY(2),"-")
			IStop=ActCMS_DIY2(0)
			rev=ActCMS_DIY2(1)
			SavePic=ActCMS_DIY2(2)
			MakeHtml=ActCMS_DIY2(3)
	  Else
			IStop=0
			rev=1
			SavePic=0
			MakeHtml=1
	  End If 
	   IntactTitle=ActCMS_DIY(0)
	   If UBound(KeywordArr)=>0 Then Keywords=KeywordArr(0)
	   author=ActCMS_DIY(6)
	   CopyFrom=ActCMS_DIY(8)
	   Intro=ActCMS_DIY(10)
	   GroupID_ACT=Replace(ActCMS_DIY(14),"-",",")
	   Score_ACT=ActCMS_DIY(16)
	   Dim ACTCode
	   Set ACTCode =New ACT_Code
	   If Trim(ActCMS_DIY(13)) <> "" Then Content =Server.HTMLEncode(ACTCode.LoadTemplate(ActCMS_DIY(13)))
		IF Request.QueryString("ClassID") <> "" Then
			Rs.OPen "Select ClassName,ClassID from Class_Act  where ClassID = '"& Request.QueryString("ClassID") &"' and ChangesLinkUrl =''",Conn,1,1
			If Not rs.eof Then 
				ClassName = Rs("ClassName")
				ClassID = Rs("ClassID")
			Else
				response.write "程序出现错误,该栏目是外部栏目,或该栏目已被删除"
				response.End 
			End If 
		Else
			IF Session("ClassName") <> "" And Session("ClassID") <> "" Then
				ClassName = Session("ClassName")
				ClassID = Session("ClassID")
			End IF
		End IF
	End If

	Function  Classmake(ModeID)
		 Dim FolderRS,selected
		 Set FolderRS = actcms.actexe("Select * from Class_act where ParentID='0' And ModeID="&ModeID&"  and ChangesLinkUrl='' Order by Orderid desc,ID desc")
		 IF FolderRS.Eof Then
		 Classmake=("<br><li>还没有添加任何栏目!")
		 Else 
		 do while Not FolderRS.Eof
				If ClassID=FolderRS("ClassID") Then selected=" selected=""selected""" Else selected=""
				 Classmake=Classmake&"<option value='"&FolderRS("ClassID")&"' "&selected&">"& FolderRS("ClassName") & "</option>"& vbCrLf
				 Classmake=Classmake&(GetChildClassList(FolderRS("ClassID"),""))
			 FolderRS.MoveNext
		 Loop
		 End IF
	 End  Function 
	 Function GetChildClassList(ClassIDs,Str)
	       Dim Sql,RsTempObj,TempImageStr,ImageStr,CheckStr,selected
	        TempImageStr = "&nbsp;└"
	        Sql = "Select * from Class_act where ParentID='" & ClassIDs & "'  and ChangesLinkUrl=''"
	        ImageStr = Str & "&nbsp;└"
	        Set RsTempObj = Conn.Execute(Sql)
	            do while Not RsTempObj.Eof
					If ClassID=RsTempObj("ClassID") Then selected=" selected=""selected""" Else selected=""
					   GetChildClassList = GetChildClassList  & "<option value='"&RsTempObj("ClassID")&"' "&selected&">"& ImageStr & TempImageStr &" "& RsTempObj("ClassName")& "</option>"& vbCrLf
					   GetChildClassList = GetChildClassList & GetChildClassList(RsTempObj("ClassID"),ImageStr)
					   RsTempObj.MoveNext
	           loop
	       Set RsTempObj = Nothing
	 End Function
	 
 With Response 
%>
<body>
<form  name="tcjdxr" method="post" action="ACT.Save.asp?action=<%=Straction%>&ModeID=<%=Request("ModeID")%>&ID=<%=Request("ID")%>&actcms=<%=Request.QueryString("actcms")%>">

<table width="99%" border="0" cellpadding="2" cellspacing="1" class="table">
  <tr>
    <td colspan="3" align="left" class="bg_tr">您现在的位置：<%=ModeName%>管理 &gt;&gt; 添加<%=ModeName%></td>
  </tr>
  <tr>
    <td height="23" align="right"><%=ModeName%>类型：</td>
    <td height="23" colspan="2" align="left">
	<input type="radio" <%if ArticlePic= 0 Then Response.Write "Checked "%> name="ArticlePic" value="0"  id="ArticlePic1"  onclick="ArticlePics(this.value)"/>
	<label for="ArticlePic1">普通<%=ModeName%></label>
      <input <%if ArticlePic= 1 Then Response.Write "Checked "%>  type="radio" name="ArticlePic" value="1" id="ArticlePic2" onclick="ArticlePics(this.value)"/>
      <label for="ArticlePic2">图片或幻灯片<%=ModeName%></label>
	   <input <%if ChangesLink= 1 Then Response.Write "Checked "%> name="ChangesLink" type="checkbox" id="ChangesLink" value="1"  onclick="ChangesLinks()"/>
	<label for="ChangesLink"><font color="#FF0000"><b>使用转向链接</b></font></label>
	<span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_001',this)">帮助</span>
</td>
  </tr>
  <tr  id=ArticlePic>
    <td height="23" colspan="3" align="right">
	<table width="100%" border="0" cellpadding="2" cellspacing="1" class="table"> 
	  <tr ClassSetting3><td width="15%" rowspan="2" align="right" class="bg_tr"><div align="center">图片地址:</div></td><td width="86%" height="13" align="left"><input  name="PicUrl" type="text" id="PicUrl" value="<%= PicUrl %>" size="40">
	    <input <% if Slide=1 then Response.Write  "Checked"%>   id="Slide" type="checkbox" value="1" name="Slide" /><label for=Slide>&nbsp;&nbsp;是否幻灯片&nbsp;&nbsp;</label>
		<input name="slt" type="checkbox" id="slt" value="1"  <% if Action<>"edit" then Response.Write  "Checked"%> ><label for="slt">生成缩略图</label></td> </tr><tr ClassSetting3><td height="14"> <iframe src="../Upload_Admin.asp?Action=<%=Action%>&ModeID=<%=ModeID%>&amp;instr=1&amp;instrname=PicUrl&amp;YNContent=1&amp;instrct=content" name="image" width='75%' height="25" scrolling="No" frameborder="0" id="image"></iframe>
		
      </td>  
	  </tr></table>	</td>
    </tr>
  <tr>
    <td width="15%" height="23" align="right">所属栏目：</td>
    <td height="23" colspan="2" align="left">

<select name="ClassID">
<option>请选择栏目</option>
      <%= Classmake(ModeID)%>
    </select>  
			自定义属性：<select name="ATT" id="ATT">
					<option value="0">普通<%=ModeName%></option>
			<%=ACTCMS.ACT_ATT(ATT)%></select>
			<span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_002',this)">帮助</span>
	 </td>
  </tr>
  <tr>
    <td height="23" align="right" >简短标题：</td>
    <td height="23" colspan="2" align="left">
      <input name="Title" type="text"  id="Title" value="<%=Server.HTMLEncode(Title)%>" size="62" maxlength="255" >
		<select name="select" onChange="FormatTitle(this, tcjdxr.Title, '')">
          <option selected>-- 修饰 --</option>
          <option value="1">粗体</option>
          <option value="3">红色</option>
          <option value="4">蓝色</option>
          <option value="5">倾斜</option>
          <option value="2">[图文]</option>
          <option value="-1">清除样式</option>
          <option value="-2">清除内容</option>
        </select><font color=green>支持HTML</font>&nbsp;<a target="_blank" title="链接到ACTCMS官方帮助页面.新窗口打开页面" href="http://www.actcms.com/help/article/htmlxg/">查看常用HTML效果</></td>
  </tr>
  <%If ActCMS_DIY(1)="0" Then %>
  <tr>
    <td height="23" align="right">完整标题：</td>
    <td height="23" colspan="2" align="left"><input name="IntactTitle" type="text" id="IntactTitle" value="<%= IntactTitle %>" size="50" /></td>
  </tr>
  <%
  Else 
	response.write "<input type=""hidden"" id=""IntactTitle"" name=""IntactTitle"" value="""&IntactTitle&""">"
  End If

  If ActCMS_DIY(3)="0" Then
  %>
  <tr>
    <td height="23" align="right"><%=ModeName%>属性：</td>
    <td height="23" colspan="2" align="left"><table width="100%" border="0">
                  <tr>
                    <td>
					<input  <%if IStop= "1" Then Response.Write "Checked "%> name="IStop" type="checkbox"  id="IStop" value="1">
					<label for="IStop">&nbsp;置顶&nbsp;&nbsp;</label>
					<input <%if rev= "1" Then Response.Write "Checked "%> id="rev" type="checkbox" value="1" name="rev" />
                      <label for="rev">&nbsp;&nbsp;允许评论&nbsp;&nbsp;</label>
                      <input <%if SavePic= "1" Then Response.Write "Checked "%>  id="SavePic" type="checkbox" value="1" name="SavePic" />
                      <label for="savepic">&nbsp;远程存图&nbsp;</font></label>
                      <input <%if MakeHtml= "1" Then Response.Write "Checked "%>  id="MakeHtml" type="checkbox"  value="1" name="MakeHtml" />
                      <label for="makehtml">&nbsp;&nbsp;立即生成&nbsp;&nbsp;</label>
					  <span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_003',this)">帮助</span></td>
                  </tr>
                </table>
				</td>
  </tr>
  <%
  else
  	response.write "<input type=""hidden"" id=""IStop"" name=""IStop"" value="""&IStop&""">"
  	response.write "<input type=""hidden"" id=""rev"" name=""rev"" value="""&rev&""">"
  	response.write "<input type=""hidden"" id=""SavePic"" name=""SavePic"" value="""&SavePic&""">"
  	response.write "<input type=""hidden"" id=""MakeHtml"" name=""MakeHtml"" value="""&MakeHtml&""">"

  End if%>
  <tr id=ChangesUrl <% 	
  if ChangesLink = 1 Then 
	 .Write "style=""'DISPLAY: none'"""
	else
	 .Write "style=""DISPLAY: none"""
	End if
 %> >
    <td height="23" colspan="3" align="right">
		 <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
			  <tr> 
				  <td width="13%" align="right" class="bg_tr"><div align="center">转向链接地址：</div>			 	 </td>
			    <td width="87%" ><input name="ChangesLinkUrl" type="text" id="ChangesLinkUrl" value="<%=FileName%>" size="50" maxlength="255"> 
			   <font color="#ff0000">如果<%=ModeName%>是转向链接，那么以下各项填写无效,请不要填写!</font></td>
	    </tr></table>   </td>
    </tr> 
	<%  
	If ActCMS_DIY(5)="0" Then
%>
	<tr>
    <td height="23" align="right">关键字：</td>
    <td height="23" colspan="2" align="left">
	<input name="Keywords" type="text"  size="50" maxlength="255" id="Keywords" value="<%= Keywords %>">
	<span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_005',this)">帮助</span>
	<input id=Tags type="checkbox" name="Tags" value="1"><label for=Tags>写入Tags</label>
	<%
		  For I = 0 To UBound(KeywordArr)
			.Write  "<a href=""javascript:SetValue('add','Keywords','"&","&KeywordArr(I) &"')"">【<font color=""blue"">" & KeywordArr(I) & "</font>】</a>"
		  Next
	%>
	</td>
  </tr>
  <%Else
		response.write "<input type=""hidden"" id=""Keywords"" name=""Keywords"" value="""&Keywords&""">"
	End If 
	If ActCMS_DIY(7)="0" Then
  %>
  <tr>
    <td height="23" align="right"><%=ModeName%>作者：</td>
    <td height="23" colspan="2" align="left">
	<input name="author" type="text" value="<%=author %>">
	<select name="" onchange="document.tcjdxr.author.value=this.value">
	<option>常用作者列表</option>
	<%   set rs3=ACTCMS.ActExe("Select Field1,Field2 from  AC_ACT where Types=1")
		 if Not rs3.eof Then
		 Do While Not rs3.eof
			 .Write  "<option value="&rs3("Field1") &">" & rs3("Field1") & "</option>"
			  rs3.movenext
		 Loop
		 rs3.close:set rs3=Nothing
	 End if
 %></select><input type="checkbox" id="addauthor" name="addauthor" value="1" checked>
 <label for="addauthor" title="添加格式(以-分割)： 作者-作者电子信箱">添加至作者列表中</label> 
 <span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_006',this)">帮助</span></td>
  </tr>
  <%Else
  	response.write "<input type=""hidden"" id=""author"" name=""author"" value="""&author&""">"
  	response.write "<input type=""hidden"" id=""addauthor"" name=""addauthor"" value=""1"">"
    End If
	If ActCMS_DIY(9)="0" Then
  %>
  <tr>
    <td height="23" align="right"><%=ModeName%>来源：</td>
    <td height="23" colspan="2" align="left">
	<input name="CopyFrom" type="text" value="<%= CopyFrom %>">
	<select name="" onchange="document.tcjdxr.CopyFrom.value=this.value">
	<option>常用来源列表</option>
	<% Set  rs3=ACTCMS.ActExe("Select Field1,Field2 from  AC_ACT where Types=0")
	  If Not  rs3.eof Then
		 Do While Not rs3.eof
			.Write  "<option value="&rs3("Field1") &">" & rs3("Field1") & "</option>"
			rs3.movenext
		 loop
		End if
	 %></select><input type="checkbox" id="addCopyFrom" name="addCopyFrom" value="1" checked>
 <label for="addCopyFrom" title="添加格式(以-分割)： 来源-来源网站地址">添加至来源列表中</label>
 <span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_007',this)">帮助</span></td>
  </tr>
  <%Else
		response.write "<input type=""hidden"" id=""CopyFrom"" name=""CopyFrom"" value="""&CopyFrom&""">"
  		response.write "<input type=""hidden"" id=""addCopyFrom"" name=""addCopyFrom"" value=""1"">"
    End If
    If ActCMS_DIY(11)="0" Then%>
  <tr>
    <td height="23" align="right"><%=ModeName%>导读：</td>
    <td height="23" colspan="2" align="left">
	<textarea name="Intro" cols="75" rows="4" id="Intro"><%= Intro %></textarea>
	 <span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_008',this)">帮助</span></td>
  </tr>
   <% Else
		response.write "<input type=""hidden"" id=""Intro"" name=""Intro"" value="""&Intro&""">"
	  End If 
   If Action="edit" Then Call M.ACT_MXEdit(ModeID,ID) Else Call M.ACT_MXList(ModeID) %>
  <tr>
    <td height="23" align="right"><%=ModeName%>内容：<br>
<input name="button"  type="button"  class="ACT_btn" style="cursor:hand;" onClick="insertHTMLToEditor('[NextPage]');" value="[NextPage]"><br><br>
注：手动分页符标记为：点击插入，注意大小写</td>
    <td height="23" colspan="2">
     <div>
	  <input type="hidden" id="content" name="content" value="<%=Content%>" style="display:none" />
	  <input name="hidden" type="hidden" id="cont___Config" style="display:none" value="" />
	  <iframe id="cont___Frame" src="../../editor/fckeditor/editor/fckeditor.html?InstanceName=content&amp;Toolbar=<%=ActCMS_DIY(12)%>" width="688" height="450" frameborder="0" scrolling="no"> </iframe>
        </div>	

	</td>
  </tr>
<%

If ActCMS_DIY(21)="0" Then %>
<tr>
<td  align="right">上传文件：</td>
<td>
			<iframe src="../Upload_Admin.asp?ModeID=<%=ModeID%>&amp;instr=0&amp;instrname=PicUrl&amp;YNContent=1&amp;instrct=content&file=yes" name="image" width='75%' height="25" scrolling="No" frameborder="0" id="image"></iframe>
</td>
</tr>
<%End If %>
<%
if ActCMS_DIY(18)="0"  Or ActCMS_DIY(20)="0" Then %>
  <tr>
    <td height="23" align="right">附加选项：</td>
    <td height="23" colspan="2" align="left">
	<%If ActCMS_DIY(18)="0" Then %>
	<input <%IF Request.QueryString("Action") = "edit"  Then Response.write " disabled=true "%> name="FileName" type="text" id="FileName" value="<% =FileName%>" /> 生成的文件名
      <span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_009',this)">帮助</span>
	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
	   <%End If %>
	   <%If ActCMS_DIY(20)="0" Then %>
	 <input  <%if ActCMS_DIY(19)= "1" Then Response.Write "Checked "%>  type="checkbox" id="dellink" name="dellink" value="1"><label for="dellink">除去内容中的超级链接</label>
	 <span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_dellink',this)">帮助</span>
	 <%End If %>
	 </td>
    </tr>
  <tr>
  <%End If %>
    <td height="23" align="right">添加日期：</td>
    <td height="23" colspan="2" align="left">
	<input name="UpdateTime"  type="text" id="UpdateTime" value="<%=UpdateTime%>" onfocus="WdatePicker()"  />
	  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;初始点击数：
      <input name="Hits" type="text" id="Hits" value="<%= Hits %>" />
	  <span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_010',this)">帮助</span></td>
    </tr>
	<%if ActCMS_DIY(15)="0" Then %>
  <tr>
    <td height="23" align="right">阅读权限：</td>
    <td height="23" colspan="2" align="left">	 
	<%= actcms.GetGroup_CheckBox("GroupID_ACT",GroupID_ACT,5)  %>					
	<span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_011',this)">帮助</span>  </td>
  </tr>
  <%
  Else
  		response.write "<input type=""hidden"" id=""GroupID_ACT"" name=""GroupID_ACT"" value="""&GroupID_ACT&""">"
  End If
if ActCMS_DIY(17)="0" Then
  %>
  <tr>
  <td align="right">消费点数：</td>
  <TD>
<input name="Score_ACT" type="text" id="Score_ACT" value="<%= Score_ACT %>" size="10">
  <span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_012',this)">帮助</span></td>
  </tr>
  <%Else  
  		response.write "<input type=""hidden"" id=""Score_ACT"" name=""Score_ACT"" value="""&Score_ACT&""">"
  End If %>
  <tr>
    <td height="23" align="right">模板地址：</td>
    <td height="23" colspan="2" align="left">
	<input <% IF TemplateUrl = "" Then Response.Write " checked=""checked""" %> onclick='Templates(this.value);' id="Templates2"   type="radio" name="TemplateUrl`" value="1" /><label for="Templates2">继承栏目设定</label>
      <input <% IF TemplateUrl <> "" Then Response.Write " checked=""checked""" %>  onclick='Templates(this.value);' id="Templates1" type="radio" name="TemplateUrl`" value="2" /><label for="Templates1">自定义</label>
      <div id='Templatefs' 
	   <% 	
  if TemplateUrl <> "" Then 
	 .Write "style=""'DISPLAY: none'"""
	else
	 .Write "style=""DISPLAY: none;text-align: left;"""
	End if
 %>  >
       <input name='TemplateUrl' readonly="readonly" size="30"  value='<%=TemplateUrl%>' />
          &nbsp;
          <input class="ACT_btn" type="button"  onClick="OpenWindowAndSetValue('../include/print/SelectPic.asp?CurrPath=<%=ACTCMS.ActCMS_Sys(3)%>templets',500,320,window,document.tcjdxr.TemplateUrl);" value="选择模板..."> 
      
	  
	  </div><span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_013',this)">帮助</span></td>
  </tr>

  <tr>
    <td height="23" colspan="3" align="center" >
	<input type=button onclick=CheckForm() class="ACT_btn"  name=Submit1 value="  保存  " />
      &nbsp;&nbsp; <input type="reset" class="ACT_btn" name="Submit2" value="  重置  "></td>
    </tr>
</table>
<br><br>
<p>
</form>
<% end With
	
%>
<script language="JavaScript" type="text/javascript">

function FormatTitle(obj, obj2, def_value)
{
    var FormatFlag = obj.options[obj.selectedIndex].value;
    var tmp_Title = FilterHtmlStr(obj2.value);
    switch(FormatFlag)
    {
        case "1" :
            obj2.value = "<b>" + tmp_Title + "</b>";
            break;
        case "2" :
            obj2.value = tmp_Title + "[图文]";
            break;
        case "3" :
            obj2.value = "<font color=\"red\">" + tmp_Title + "</font>";
            break;
        case "4" :
            obj2.value = "<font color=\"blue\">" + tmp_Title + "</font>";
            break;
        case "5" :
            obj2.value = "<em>" + tmp_Title + "</em>";
            break;
        case "-1" :
            if(confirm("确定要清除样式?"))
            {
                obj2.value = tmp_Title;
            }
            break;
        case "-2" :
            obj2.value = def_value;
            break;
    }
    obj.selectedIndex = 0;
}
function FilterHtmlStr(str)
{
    str = str.replace(/<.*?>/ig, "");
    return str;
}


		function OpenWindowAndSetValue(Url,Width,Height,WindowObj,SetObj)
		{
			var ReturnStr=showModalDialog(Url,WindowObj,'dialogWidth:'+Width+'pt;dialogHeight:'+Height+'pt;status:yes;help:no;scroll:yes;');
			if (ReturnStr!='') SetObj.value=ReturnStr;
			return ReturnStr;
		}	
	
		function OpenWindow(Url,Width,Height,WindowObj)
		{
			var ReturnStr=showModalDialog(Url,WindowObj,'dialogWidth:'+Width+'pt;dialogHeight:'+Height+'pt;status:no;help:no;scroll:no;');
			return ReturnStr;
		}	
		
	function Getcolor(img_val,Url,input_val){
		var arr = showModalDialog(Url, "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0; help:0");
		if (arr != null){
		document.getElementById(input_val).value = arr;
		img_val.style.backgroundColor = arr;
		}
		}		

		function ChangesLinks()
				{ if (document.tcjdxr.ChangesLink.checked==true)
				  {
				  ChangesUrl.style.display="";
				  }
				  else
					{
					 ChangesUrl.style.display="none";
					 }
				}
			
function SetValue(type,objname,strvalue)
{ 
	var obj=document.getElementById(objname)
	if (type=="add"){
		obj.value=',,,'+obj.value
		obj.value=obj.value.replace(strvalue,'');
		obj.value=obj.value+strvalue;
		obj.value=obj.value.replace(',,,','');
		obj.value=obj.value.replace(',,','');
		}
	else if (type=="+"){obj.value=parseInt(obj.value)+parseInt(strvalue);}
	else{obj.value=strvalue;}
	obj.focus(); 
 return; 
}		
	function insertHTMLToEditor(codeStr){
	  var oEditor = FCKeditorAPI.GetInstance("content");
	  if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG){
		oEditor.InsertHtml(codeStr);
	  }else{
		return false;
	  }
	}	
		function Templates(Templatef)
			{   if (Templatef==2)
			  {
			  Templatefs.style.display="";
			  }
			  else
				{
				 Templatefs.style.display="none";
				 }
			}
			
		function ArticlePics(AC)
			{   if (AC==1)
			  {
			  ArticlePic.style.display="";
			  }
			  else
				{
				 ArticlePic.style.display="none";
				 }
			}	
		function CheckForm()
	{ var form=document.tcjdxr;
	  
	 if (form.ClassID.value=='')
		{ alert("请选择栏目!");   
		  return false;
		}
		
	 if (form.Title.value=='')
		{ alert("请输入简短标题!");   
		  form.Title.focus();    
		   return false;
		}
	    form.Submit1.value="正在提交数据,请稍等...";
		form.Submit1.disabled=true;	
		form.Submit2.disabled=true;	
	    form.submit();
        return true;
	}	
	</script>
<script language="javascript">ArticlePics(<%= ArticlePic %>);</script>
</body>
</html>