<!-- #INCLUDE file="../db/conn.asp" -->
<!-- #INCLUDE file="../../public/public/language.asp" -->
<!-- #INCLUDE file="page.asp" -->
<style>
.f13_22 {
	font-size: 13px;
	line-height: 24px;
	color: #666666;
}
body,td,th {
	font-size: 13px;
}
a:link {
	color: #244E93;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #244E93;
}
a:hover {
	text-decoration: underline;
	color: #FF0000;
}
a:active {
	text-decoration: none;
	color: #FF0000;
}
</style>
<%if request("type")="answer" then'如果返回的是只读取某一个答案（answer）的内容
%>
	<%
	Set rs=Server.CreateObject("ADODB.RecordSet") 
	sql="SELECT * from FAQ where id="&request("id")
	rs.Open sql,conn,1,1
	%>
<textarea  id="div_content"><%=rs("content")%><br /><img src="images/answer.gif"/><%=replace(rs("re_content"),"<font","<") %></textarea>

	<script>
		parent.document.all.div_id_<%=rs("id")%>.innerHTML=div_content.value;
		parent.re_height()
	</script>
	<%rs.close
	response.end()
	%>
<%else%>

<script>

function show_hid(id)
{
	//三目，如果显示，就
	eval("(document.all.div_id_"+id+".className=='show')?(document.all.div_id_"+id+".className='hid'):(document.all.div_id_"+id+".className='show');");

	//读内容
	eval("if (document.all.div_id_"+id+".innerHTML==''){document.all.div_id_"+id+".innerHTML='<br>数据载入中.....<br><br>';document.all.read_answer_frame.src='?id="+id+"&type=answer';}")
	re_height()
}
function re_height()
{parent.document.all.rightFrame.style.height=document.body.scrollHeight+30}
function t(){setTimeout("re_height();t()",6000)}
t()//60秒一次

</script>	
<style type="text/css">
<!--
.f13_l22 {
	font-size: 14px;
	line-height: 22px;
	font-weight: normal;
	font-family: Arial, Helvetica, sans-serif;
}
.show {
	display:block;
}
.hid {
	display:none;
}
-->
</style>
<body onLoad="re_height()">
<iframe name="read_answer_frame"  width="0" height="0"></iframe>
<%
if request("classID")<>"" then
	classID=" and classID="&request("classID")
else
	classID=""
end if
t=0
Set rs=Server.CreateObject("ADODB.RecordSet") 
sql="SELECT * from FAQ where del=0 "&classID&" order by id"
'response.Write(sql)
'response.End() 
rs.Open sql,conn,1,1
if rs.recordcount<1 then
response.Write("没有相关信息，可以试着选择其它分类")
response.End()
end if
%>
<%
if request("count_of_page")<> "" then
	count_of_page=request("count_of_page")
elseif	request.Cookies("count_of_page")<>"" then
	count_of_page=request.Cookies("count_of_page")
else
	count_of_page=30
end if

rs.pagesize=count_of_page
response.Cookies("count_of_page")=count_of_page

page=clng(request("Page"))
if page=empty then page=1
response.Cookies("page")'写入当前页数，供page.asp用
rs.AbsolutePage=page

for i=1 to rs.pagesize'显示的条数
if not rs.eof then
%><table width="96%" cellspacing="0" >
<tr><td height="10"></td></tr>
<tr><td colspan="2" class="f13_l22"><a  href=javascript:show_hid(<%=rs("id")%>)><img src="images/ask.gif" border="0" /><%=rs("title")%></a></td>
</tr>
<tr bgcolor="#F6F6F6" ><td width="34"></td><td valign="top" class="f13_22"><div id="div_id_<%=rs("id")%>"></div></td></tr>
</table> 
<% 

rs.movenext 
end if
if rs.eof then exit for 
next 
 

call fy("100%","#EFF7FC","center","style='border:#BAD6F1 1px solid;'")'调用分页

rs.close 
%>

<%end if%>