<% Option Explicit %>
<!--#include file="../../Inc/Function.asp" -->
<!--#include file="../../Inc/Const.asp" -->
<!--#include file="../../Inc/Cls_DB.asp" -->
<%
Dim DBC,Conn
Set DBC = New DataBaseClass
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
%>
<!--#include file="../../Inc/Session.asp" -->
<!--#include file="../../Inc/CheckPopedom.asp" -->
<%
Dim NewsSql,RsNewsObj,RsClassObj,RsChildClassObj,ClassID,ClassCName,NewsType,NewsTypeStr,PicStr,SunNumAsp
ClassID = Request("ClassID")
if Not JudgePopedomTF(Session("Name"),""&ClassID&"") then Call ReturnError1()
if ClassID <> "" then
	Set RsClassObj = Conn.Execute("Select ClassCName,ClassEName from NewsClass where ClassID='" & ClassID & "' and DelFlag=0")
	if Not RsClassObj.Eof then
		ClassCName = RsClassObj("ClassCName")
	else
		if ClassID = "0" then
			ClassCName = "根栏目"
		else
			ClassCName = "栏目不存在，请重新加载"
		end if
	end if
	Set RsChildClassObj = Conn.Execute("Select * from NewsClass where ParentID='" & ClassID & "' and DelFlag=0")
else
	ClassCName = "参数传递错误，请重新加载"
end if
dim K1,K2
if request("Keywords")<>"" then
	K1="and Title like '%"&request.Form("Keywords")&"%'"
end if
if request("Dyear")<>"" and request("Dmonth")<>"" and request("Dday")<>"" then
	K2="and year(AddDate) = "&request("Dyear")&" and month(AddDate) = "&request("Dmonth")&" and day(AddDate) = "&request("Dday")&""
end if
	NewsSql = "Select * from News where ClassID='" & ClassID & "' "&K1&" "&K2&" and DelTF=0  order by AddDate desc"
Set RsNewsObj = Server.CreateObject("Adodb.RecordSet")
	RsNewsObj.Open NewsSql,Conn,3,3
	SunNumAsp = RsNewsObj.RecordCount
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新闻列表</title>
</head>
<link href="../../CSS/css.css" rel="stylesheet">
<script src="../JS/PublicJS.js" language="JavaScript"></script>
<body topmargin="0" leftmargin="0" ondragstart="return false;" onselectstart="return false;" oncontextmenu="ClickClassOrNews(true);showMenu(MouseRightMenu);return false;">
<table id="MainTable" onclick="ClickClassOrNews(false);" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tr> 
          <td width="50%" class="ButtonList"><div align="center">名称</div></td>
          <td width="13%" class="ButtonList"><div align="center">状态</div></td>
          <td width="23%" class="ButtonList"><div align="center">时间</div></td>
          <td width="14%" class="ButtonList"><div align="center">大小( byte)</div></td>
        </tr>
        <%
	do while Not RsChildClassObj.Eof
%>
        <tr> 
          <td height="22"> <table border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><img src="../Images/Folder.gif" width="18" height="18"></td>
                <td><span class="TempletItem" ClassID="<% = RsChildClassObj("ClassID") %>" align="center"> 
                  <% = RsChildClassObj("ClassCName") %>
                  </span> </td>
              </tr>
            </table></td>
          <td height="22"><div align="center" class="TempletItem">-</div></td>
          <td height="22"><div align="center" class="TempletItem"> 
              <% = RsChildClassObj("AddTime") %>
            </div></td>
          <td height="22"><div align="center" class="TempletItem">- </div></td>
        </tr>
        <%
		RsChildClassObj.MoveNext
	loop
if not  RsNewsObj.Bof And not RsNewsObj.Eof  then 
	Dim Page_Size,Page_No,Page_Total,Record_All
	Page_Size=20
	Page_No = Request.Querystring("Page_No")
    if Page_No <= 1 or Page_No = "" then Page_No = 1
	If Request.QueryString("Page_No") = "" then
		Page_No = 1
	end if
	RsNewsObj.PageSize = Page_Size
	page_total=RsNewsObj.PageCount
	if (Cint(Page_No)>Page_Total) then Page_No = Page_Total
	RsNewsObj.AbsolutePage = Page_No
	Record_All = RsNewsObj.RecordCount
	Dim i
  	for i=1 to RsNewsObj.PageSize
    	if RsNewsObj.eof then exit for

	if RsNewsObj("HeadNewsTF")<>"1" and RsNewsObj("PicNewsTF")<>"1" then
	   NewsType = 1
	   NewsTypeStr = "文字新闻"
	   PicStr = "../Images/WordNews.gif"
	elseif RsNewsObj("HeadNewsTF")="1" then
	   NewsType = 2
	   NewsTypeStr = "标题新闻"
	   PicStr = "../Images/TitleNews.gif"
	else
	   NewsType = 3
	   NewsTypeStr = "图片新闻"
	   PicStr = "../Images/PicNews.gif"
	end if
	if RsNewsObj("FileExtName") = "asp" then
	   PicStr = "../Images/asp.gif"
	end If
%>
        <tr> 
          <td height="22"> <table border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td><img src="<% = PicStr %>" width="18" height="18"></td>
                <td><span NewsType="<% = NewsType %>" AuditTF="<%=RsNewsObj("AuditTF")%>" class="TempletItem" NewsID="<% = RsNewsObj("NewsID") %>" align="center"> 
                  <% = GotTopic(RsNewsObj("Title"),40) %>
                  </span> </td>
              </tr>
            </table></td>
          <td height="22"> <div align="center" class="TempletItem"> 
              <% if RsNewsObj("AuditTF")=1 then
				  response.Write("<font color=blue>已审批</font>")
			  else
				  response.Write("<font color=red>未审批</font>")
			  end if
			  %>
            </div></td>
          <td height="22"> <div align="center" class="TempletItem"> 
              <% = RsNewsObj("AddDate") %>
            </div></td>
          <td height="22"><div align="center" class="TempletItem"> 
              <% = Len(RsNewsObj("Content")) %>
            </div></td>
        </tr>
        <%
	RsNewsObj.MoveNext
next
end if
%>
      </table>
     <%if RsNewsObj.RecordCount<>0 and RsNewsObj.RecordCount >= Page_Size then
	 %>
      <br>
      <table width="96%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          
            
          <td width="62%">&nbsp;</td>
         
          <td width="38%"> <div align="right"> 
              <% =  "NO.<b>"& page_no &"</b>,&nbsp;&nbsp;" %>
              <% = "Totel:<b>"& page_total &"</b>,&nbsp;RecordCounts:<b>" & record_all &"</b>&nbsp;&nbsp;&nbsp;"%>
              <%
if Page_Total=1 then
		response.Write "&nbsp;<img src=../images/First1.gif border=0 alt=首页></img>&nbsp;"
		response.Write "&nbsp;<img src=../images/prePage.gif border=0 alt=上一页></img>&nbsp;"
		response.Write "&nbsp;<img src=../images/nextPage.gif border=0 alt=下一页></img>&nbsp;"
		response.Write "&nbsp;<img src=../images/endPage.gif border=0 alt=尾页></img>&nbsp;"
else
	if cint(Page_No)<>1 and cint(Page_No)<>Page_Total then
		response.Write "&nbsp;<a href=?ClassID="&ClassID&"&Page_no=1&Keywords="&Request("Keywords")&"&Dyear="&request("Dyear")&"&Dmonth="&request("Dmonth")&"&Dday="&request("Dday")&"><img src=../images/First1.gif border=0 alt=首页></img></a>&nbsp;"
		response.Write "&nbsp;<a href=?ClassID="&ClassID&"&Page_no="&cstr(cint(Page_No)-1)&"&Keywords="&Request("Keywords")&"&Dyear="&request("Dyear")&"&Dmonth="&request("Dmonth")&"&Dday="&request("Dday")&"><img src=../images/prePage.gif border=0 alt=上一页></img></a>&nbsp;"
		response.Write "&nbsp;<a href=?ClassID="&ClassID&"&Page_no="&cstr(cint(Page_No)+1)&"&Keywords="&Request("Keywords")&"&Dyear="&request("Dyear")&"&Dmonth="&request("Dmonth")&"&Dday="&request("Dday")&"><img src=../images/nextPage.gif border=0 alt=下一页></img></a>&nbsp;"
		response.Write "&nbsp;<a href=?ClassID="&ClassID&"&Page_no="& Page_Total &"&Keywords="&Request("Keywords")&"&Dyear="&request("Dyear")&"&Dmonth="&request("Dmonth")&"&Dday="&request("Dday")&"><img src=../images/endPage.gif border=0 alt=尾页></img></a>&nbsp;"
	elseif cint(Page_No)=1 then
		response.Write "&nbsp;<img src=../images/First1.gif border=0 alt=首页></img></a>&nbsp;"
		response.Write "&nbsp;<img src=../images/prePage.gif border=0 alt=上一页></img>&nbsp;"
		response.Write "&nbsp;<a href=?ClassID="&ClassID&"&Page_no="&cstr(cint(Page_No)+1)&"&Keywords="&Request("Keywords")&"&Dyear="&request("Dyear")&"&Dmonth="&request("Dmonth")&"&Dday="&request("Dday")&"><img src=../images/nextPage.gif border=0 alt=下一页></img></a>&nbsp;"
		response.Write "&nbsp;<a href=?ClassID="&ClassID&"&Page_no="& Page_Total &"&Keywords="&Request("Keywords")&"&Dyear="&request("Dyear")&"&Dmonth="&request("Dmonth")&"&Dday="&request("Dday")&"><img src=../images/endpage.gif border=0 alt=尾页></img></a>&nbsp;"
	else
		response.Write "&nbsp;<a href=?ClassID="&ClassID&"&Page_no=1&Keywords="&Request("Keywords")&"&Dyear="&request("Dyear")&"&Dmonth="&request("Dmonth")&"&Dday="&request("Dday")&"><img src=../images/First1.gif border=0 alt=首页></img>&nbsp;"
		response.Write "&nbsp;<a href=?ClassID="&ClassID&"&Page_no="&cstr(cint(Page_No)-1)&"&Keywords="&Request("Keywords")&"&Dyear="&request("Dyear")&"&Dmonth="&request("Dmonth")&"&Dday="&request("Dday")&"><img src=../images/prePage.gif border=0 alt=上一页></img></a>&nbsp;"
		response.Write "&nbsp;<img src=../images/nextPage.gif border=0 alt=下一页></img></a>&nbsp;"
		response.Write "&nbsp;<img src=../images/endpage.gif border=0 alt=尾页></img>&nbsp;"
	end if
end if
%>
              　　 </div></td>
        </tr>
      </table><%end if%></td>
  </tr>
</table>

<p>&nbsp;</p></body>
</html>
<!-- 鼠标右键菜单 -->
<div id=MouseRightMenu onclick="ClickMenu(this);" onmouseover="MouseOverRightMenu();" onmouseout="MouseOverRightMenu();" class="menu"> 
  <div class="MouseRightItem" id="Add" HaveChild="true">新建&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; 
    <div id="ChildMenu1" class="childmenu"> 
      <div class="MouseRightItem" id="ChildreFresh" ExeFunction="CreateWordNews();">文字新闻</div>
      <div class="MouseRightItem" id="ChildreFresh1" ExeFunction="CreateTitleNews();">标题新闻</div>
      <div class="MouseRightItem" id="ChildreFresh2" ExeFunction="CreatePicNews();">图片新闻</div>
      <div class="MouseRightItem" id="ChildreFresh0" ExeFunction="AddClassFun();">新建栏目</div>
    </div>
  </div>
  <div class="MouseRightItem" id="Edit" ExeFunction="EditNews();">修改</div>
  <div class="MouseRightItem" id="Del" ExeFunction="DelNewsClass();">删除</div>
  <div class="MouseRightItem" id="ToSpecial" ExeFunction="OpenWindow('Frame.asp?FileName=NewsToSpecial.asp&Titles=添加到新闻专题&NewsID='+NewsID,350,120,window);">加入专题</div>
  <div class="MouseRightItem" id="ToJs" HaveChild="true">加入JS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; 
    <div id="ChildMenu2" class="childmenu"> 
      <div class="MouseRightItem" id="ChildPicJS" ExeFunction="OpenWindow('../FreeJs/JsTip.asp?FileName=NewsToJs.asp&Types=PicJs&Title=添加到图片JS&NewsID='+NewsID,350,135,window);">图片JS</div>
      <div class="MouseRightItem" id="ChildWordJS" ExeFunction="OpenWindow('../FreeJs/JsTip.asp?FileName=NewsToJs.asp&Types=WordJs&Title=添加到文字JS&NewsID='+NewsID,350,115,window);">文字JS</div>
    </div>
  </div>
  <hr id="HR3">
  <div class="MouseRightItem" id="Cut" ExeFunction="CutOperation();">剪切</div>
  <div class="MouseRightItem" id="Copy" ExeFunction="CopyOperation();">拷贝</div>
  <div class="MouseRightItem" id="Paste" ExeFunction="PasteOperation();">粘帖</div>
  <div class="MouseRightItem" id="Check" ExeFunction="OpenWindow('Frame.asp?FileName=ReCheckNews.asp&OperateType=Check&Titles=审核新闻&NewsID='+NewsID,220,105,window);">审核</div>
  <div class="MouseRightItem" id="ReCheck" ExeFunction="OpenWindow('Frame.asp?FileName=ReCheckNews.asp&OperateType=UnCheck&Titles=撤消审核&NewsID='+NewsID,220,105,window);">撤消审核</div>
  <div class="MouseRightItem" id="UnCheck" ExeFunction="UnCheck();">全部未审核信息</div>
  <div class="MouseRightItem" id="Review" ExeFunction="OpenWindow('Frame.asp?FileName=Review.asp&Titles=评论管理&NewsID='+NewsID,630,338,window);">评论管理</div>
  <div class="MouseRightItem" id="UnCheck" ExeFunction="OpenWindow('Frame.asp?FileName=Review.asp&Titles=评论管理',630,338,window);">全部评论</div>
  <div class="MouseRightItem" id="AllNews" ExeFunction="AllNews();">管理全部信息</div>
  <div class="MouseRightItem" id="Read1" ExeFunction="Read();">预览</div>
  <div class="MouseRightItem" id="Refresh" ExeFunction="window.location.reload();">刷新</div>
</div>
<%
Set RsChildClassObj = Nothing
Set RsNewsObj = Nothing
Set RsClassObj = Nothing
Set Conn = Nothing
%>
<script language="javascript">
var ClassID='';
var NewsID='';
var NewsType='';
var AuditTF='';
var BigClassID='<% = ClassID %>';
var ListObjArray=new Array();
parent.MoveOrCopyObjectClass=BigClassID;
Edit.className='MenuItemDisable';
Del.className='MenuItemDisable';
Cut.className='MenuItemDisable';
Copy.className='MenuItemDisable';
ToJs.className='MenuItemDisable';
ToSpecial.className='MenuItemDisable';
Review.className='MenuItemDisable';
Read1.className='MenuItemDisable';
ReCheck.className='MenuItemDisable';
Check.className='MenuItemDisable';
if ((parent.MoveOrCopySourceClass!='')||(parent.MoveOrCopySourceNews!=''))
{
	if (parent.MoveOrCopySourceNews!='')
	{
		if (BigClassID=='0') Paste.className='MenuItemDisable';
		else  Paste.className='MouseRightItem';
	}
	else  Paste.className='MouseRightItem';
}
else Paste.className='MenuItemDisable';
IntialListObjArray();
function IntialListObjArray()
{
	var CurrObj=null,j=1;
	for (var i=0;i<document.all.length;i++)
	{
		CurrObj=document.all(i);
		if ((CurrObj.NewsID!=null)||(CurrObj.ClassID!=null))
		{
			if (CurrObj.NewsID!=null)
			{
				ListObjArray[ListObjArray.length]=new ListObj(CurrObj,0,j,false);
				j++;
			}
			if (CurrObj.ClassID!=null)
			{
				ListObjArray[ListObjArray.length]=new ListObj(CurrObj,1,j,false);
				j++;
			}
		}
	}
}
function ListObj(Obj,Type,Index,Selected)
{
	this.Obj=Obj;
	this.Index=Index;
	this.Type=Type;
	this.Selected=Selected;
}
function ClickClassOrNews(MouseRight)
{
	var el=event.srcElement;
	var i=0;
	if (!MouseRight)
	{
		if ((event.ctrlKey==true)||(event.shiftKey==true))
		{
			if (event.ctrlKey==true)
			{
				for (i=0;i<ListObjArray.length;i++)
				{
					if (el==ListObjArray[i].Obj)
					{
						if (ListObjArray[i].Selected==false)
						{
							ListObjArray[i].Obj.className='TempletSelectItem';
							ListObjArray[i].Selected=true;
						}
						else
						{
							ListObjArray[i].Obj.className='TempletItem';
							ListObjArray[i].Selected=false;
						}
					}
				}
			}
			if (event.shiftKey==true)
			{
				var MaxIndex=0,ObjInArray=false,EndIndex=0,ElIndex=-1;
				for (i=0;i<ListObjArray.length;i++)
				{
					if (ListObjArray[i].Selected==true)
					{
						if (ListObjArray[i].Index>=MaxIndex) MaxIndex=ListObjArray[i].Index;
					}
					if (el==ListObjArray[i].Obj)
					{
						ObjInArray=true;
						ElIndex=i;
						EndIndex=ListObjArray[i].Index;
					}
				}
				if (MaxIndex!=0)
				{
					for (i=MaxIndex-1;i<EndIndex;i++)
					{
						ListObjArray[i].Obj.className='TempletSelectItem';
						ListObjArray[i].Selected=true;
					}
				}
				else
				{
					if (ElIndex!=-1)
					{
						ListObjArray[ElIndex].Obj.className='TempletSelectItem';
						ListObjArray[ElIndex].Selected=true;
					}
				}
			}
		}
		else
		{
			for (i=0;i<ListObjArray.length;i++)
			{
				if (el==ListObjArray[i].Obj)
				{
					ListObjArray[i].Obj.className='TempletSelectItem';
					ListObjArray[i].Selected=true;
				}
				else
				{
					ListObjArray[i].Obj.className='TempletItem';
					ListObjArray[i].Selected=false;
				}
			}
		}
	}
	else
	{
		var elInSelectArray=false;
		for (i=0;i<ListObjArray.length;i++)
		{
			if (el==ListObjArray[i].Obj)
			{
				if (ListObjArray[i].Selected==true)
				{
					elInSelectArray=true;
				}
			}
		}
		if (!elInSelectArray)
		{
			for (i=0;i<ListObjArray.length;i++)
			{
				if (el==ListObjArray[i].Obj)
				{
					ListObjArray[i].Obj.className='TempletSelectItem';
					ListObjArray[i].Selected=true;
				}
				else
				{
					ListObjArray[i].Obj.className='TempletItem';
					ListObjArray[i].Selected=false;
				}
			}
		}
		GetID();
		var NewsFlag,ClassFlag,SelectIDType=-1;
		ClassFlag=(ClassID!='')?1:0;
		NewsFlag=(NewsID!='')?1:0;
		SelectIDType=(ClassFlag&&NewsFlag)?0:SelectIDType;  //栏目ID和新闻ID都不为空------0
		SelectIDType=(!ClassFlag&&!NewsFlag)?1:SelectIDType;  //栏目ID和新闻ID都为空--------1
		SelectIDType=(ClassFlag&&!NewsFlag)?2:SelectIDType;  //栏目ID不为空，新闻ID为空----2
		SelectIDType=(!ClassFlag&&NewsFlag)?3:SelectIDType;  //栏目ID为空，新闻ID不为空----3
		if (SelectIDType==2) SelectIDType=(ClassID.indexOf(',')==-1)?4:SelectIDType;  //只选择了一个栏目----4 
		if (SelectIDType==3) SelectIDType=(NewsID.indexOf(',')==-1)?5:SelectIDType;  //只选择了一个新闻----5
		//alert(SelectIDType);
		switch (SelectIDType)
		{
			case 0:
				Edit.className='MenuItemDisable';
				Del.className='MenuItemDisable';
				Cut.className='MenuItemDisable';
				Copy.className='MenuItemDisable';
				ToJs.className='MenuItemDisable';
				ToSpecial.className='MenuItemDisable';
				Review.className='MenuItemDisable';
				Read1.className='MenuItemDisable';
				ReCheck.className='MenuItemDisable';
				Check.className='MenuItemDisable';
				Paste.className='MenuItemDisable';
				break;
			case 1:
				Edit.className='MenuItemDisable';
				Del.className='MenuItemDisable';
				Cut.className='MenuItemDisable';
				Copy.className='MenuItemDisable';
				ToJs.className='MenuItemDisable';
				ToSpecial.className='MenuItemDisable';
				Review.className='MenuItemDisable';
				Read1.className='MenuItemDisable';
				ReCheck.className='MenuItemDisable';
				Check.className='MenuItemDisable';
				if ((parent.MoveOrCopySourceClass!='')||(parent.MoveOrCopySourceNews!=''))
				{
					if (parent.MoveOrCopySourceNews!='')
					{
						if (BigClassID=='0') Paste.className='MenuItemDisable';
						else  Paste.className='MouseRightItem';
					}
					else  Paste.className='MouseRightItem';
				}
				else Paste.className='MenuItemDisable';
				break;
			case 2:
				Edit.className='MenuItemDisable';
				Del.className='MouseRightItem';
				Cut.className='MouseRightItem';
				Copy.className='MenuItemDisable';
				ToJs.className='MenuItemDisable';
				ToSpecial.className='MenuItemDisable';
				Review.className='MenuItemDisable';
				Read1.className='MenuItemDisable';
				ReCheck.className='MenuItemDisable';
				Check.className='MenuItemDisable';
				Paste.className='MenuItemDisable';
				break;
			case 3:
				Edit.className='MenuItemDisable';
				Del.className='MouseRightItem';
				Cut.className='MouseRightItem';
				Copy.className='MouseRightItem';
				ToJs.className='MouseRightItem';
				ToSpecial.className='MouseRightItem';
				Review.className='MenuItemDisable';
				Read1.className='MenuItemDisable';
				ReCheck.className='MouseRightItem';
				Check.className='MouseRightItem';
				Paste.className='MenuItemDisable';
				break;
			case 4:
				Edit.className='MouseRightItem';
				Del.className='MouseRightItem';
				Cut.className='MouseRightItem';
				Copy.className='MenuItemDisable';
				ToJs.className='MenuItemDisable';
				ToSpecial.className='MenuItemDisable';
				Review.className='MenuItemDisable';
				Read1.className='MenuItemDisable';
				ReCheck.className='MenuItemDisable';
				Check.className='MenuItemDisable';
				if ((parent.MoveOrCopySourceClass!='')||(parent.MoveOrCopySourceNews!=''))
				{
					if (parent.MoveOrCopySourceNews!='')
					{
						if (BigClassID=='0') Paste.className='MenuItemDisable';
						else  Paste.className='MouseRightItem';
					}
					else  Paste.className='MouseRightItem';
				}
				else Paste.className='MenuItemDisable';
				break;
			case 5:
				Edit.className='MouseRightItem';
				Del.className='MouseRightItem';
				Cut.className='MouseRightItem';
				Copy.className='MouseRightItem';
				if (NewsType=='2')
				{
					ToJs.className='MenuItemDisable';
					ToSpecial.className='MenuItemDisable';
				 }
				else
				{
					ToJs.className='MouseRightItem';
					ToSpecial.className='MouseRightItem';
				 }
				Review.className='MouseRightItem';
				Read1.className='MouseRightItem';
				ReCheck.className='MouseRightItem';
				Check.className='MouseRightItem';
				Paste.className='MenuItemDisable';
				break;
			default:
			
		}
	}
}
function GetID()
{
	NewsID='';
	ClassID='';
	for (i=0;i<ListObjArray.length;i++)
	{
		if (ListObjArray[i].Selected==true)
		{
			if (ListObjArray[i].Type==0)
			{
				if (NewsID=='') NewsID=ListObjArray[i].Obj.NewsID;
				else NewsID=NewsID+','+ListObjArray[i].Obj.NewsID;
				NewsType=ListObjArray[i].Obj.NewsType;
			}
			else
			{
				if (ClassID=='') ClassID=ListObjArray[i].Obj.ClassID;
				else ClassID=ClassID+','+ListObjArray[i].Obj.ClassID;
			}
		}
	}
}
function CutOperation()
{
	parent.MoveTF=true;
	if (ClassID!='')
	{
		parent.MoveOrCopySourceClass=ClassID;
		parent.MoveOrCopySourceNews='';
		parent.OperationType='Class';
	}
	if (NewsID!='')
	{
		parent.MoveOrCopySourceClass='';
		parent.MoveOrCopySourceNews=NewsID;
		parent.OperationType='News';
	}
}

function CopyOperation()
{
	parent.MoveTF=false;
	if (ClassID!='')
	{
		parent.MoveOrCopySourceClass=ClassID;
		parent.MoveOrCopySourceNews='';
		parent.OperationType='Class';
	}
	if (NewsID!='')
	{
		parent.MoveOrCopySourceClass='';
		parent.MoveOrCopySourceNews=NewsID;
		parent.OperationType='News';
	}
}

function PasteOperation()
{
	if (ClassID=='') parent.MoveOrCopyObjectClass=BigClassID;
	else  parent.MoveOrCopyObjectClass=ClassID;
	var MoveOrCopyClassPara='OperationType:'+parent.OperationType+';MoveTF:'+parent.MoveTF+';SourceClass:'+parent.MoveOrCopySourceClass+';SourceNews:'+parent.MoveOrCopySourceNews+';ObjectClass:'+parent.MoveOrCopyObjectClass+';';
	OpenWindow('Frame.asp?FileName=MoveOrCopyNewsClass.asp&Titles=新闻栏目移动复制&MoveOrCopyClassPara='+MoveOrCopyClassPara,260,100,window);
}

function HeadNews()
{
	if (ClassID!='') OpenWindow('Frame.asp?FileName=HeadNewsEdit.asp&ClassID='+ClassID,350,180,window);
	else OpenWindow('Frame.asp?FileName=HeadNewsEdit.asp&ClassID='+BigClassID,350,180,window);
}

function Read()
{
  if (NewsID!='') window.open('Read.asp?NewsID='+NewsID);
  else alert(错误的参数);
 }

function UnCheck()
{
  if (ClassID!='') parent.frames['OpreateWindow'].location='CheckNewsList.asp?ClassID='+ClassID ;
  else parent.frames['OpreateWindow'].location='CheckNewsList.asp?ClassID='+BigClassID;
 }
function AllNews()
{
	parent.frames['OpreateWindow'].location='AllNews.asp'
}

function CreateWordNews()
{
	OpenWindow('Frame.asp?FileName=NewsAddWords.asp&Titles=新闻添加--文字新闻&ClassID='+BigClassID,620,510,window);
 }

function CreateTitleNews()
{
	OpenWindow('Frame.asp?FileName=NewsAddTitle.asp&Titles=新闻添加--标题新闻&ClassID='+BigClassID,420,320,window);
 }

function CreatePicNews()
{
	OpenWindow('Frame.asp?FileName=NewsAddPic.asp&Titles=新闻添加--图片新闻&ClassID='+BigClassID,620,530,window);
 }

function EditNews()
{
	if (NewsID!='')
	{
		switch (NewsType)
		{
			case '1':
				OpenWindow('NewsModify.asp?NewsID='+NewsID,620,500,window);
				break;
			case '2':
				OpenWindow('NewsModify.asp?NewsID='+NewsID,500,280,window);
				break;
			case '3':
				OpenWindow('NewsModify.asp?NewsID='+NewsID,620,530,window);
				break;
			default:
				return;
		}
	}
	if (ClassID!='')
	{
		OpenWindow('Frame.asp?FileName=ClassEdit.asp&Titles=修改栏目&ClassID='+ClassID,350,255,window);
	}
}
function DelNewsClass()
{
	if (ClassID!='') OpenWindow('Frame.asp?FileName=DelNewsClass.asp&Titles=删除栏目&ClassID='+ClassID,300,101,window);
	if (NewsID!='') OpenWindow('Frame.asp?FileName=DelNewsClass.asp&Titles=删除新闻&NewsID='+NewsID,300,101,window);
}

function AddClassFun()
{
	 OpenWindow('Frame.asp?FileName=ClassAdd.asp&Titles=添加栏目&ParentID='+BigClassID,350,260,window);
}
</script>
