<%@ Language=VBScript %>
<%Option Explicit
Response.Buffer = True
%>
<!-- #INCLUDE FILE = "inc.asp" -->
<html>
<head>
<script language="javascript" src="ref.js"></script>
</head>
<body>
<%
If Session("GUID") = Empty Then err("请您先登陆网站，再进入聊天室。")

Dim bChannel
bChannel = Session("Channel")
If bChannel Then
	bChannel = False
	writeJS "<span class=""SystemInfo""><b>[系统提示]</b> 您已经关闭了“我的频道”！</span><br>", bChannel
Else
	bChannel = True
	writeJS "<span class=""SystemInfo""><b>[系统提示]</b> 您已经打开了“我的频道”！</span><br>", bChannel
End If
Session("Channel") = bChannel

Sub writeJS(sOutPut, bChannel)
    If sOutPut <> Empty Then '替换可能引起错误的字符
        Response.Write "<script language=""javascript"">" & vbCrLf & _
            "<!--" & vbCrLf
        sOutPut = Replace(sOutPut, "\", "\\")
        sOutPut = Replace(sOutPut, """", "\""")
        Response.Write "writemsg(""" & sOutPut & """);" & vbCrLf '显示聊天内容
        If bChannel Then
			Response.Write "parent.Content.rows=""50%,50%"";parent.Input.document.all.channelimg.src='images/channel.gif';"
		Else
			Response.Write "parent.Content.rows=""*,0"";parent.Input.document.all.channelimg.src='images/closechannel.gif';"
		End If
        Response.Write "//-->" & vbCrLf
        Response.Write "</script>" & vbCrLf
    End If
End Sub
%>
</body>
</html>