<%
Function Head
	Response.Write("<div id=""webhead"">") & VbCrLf
	Response.Write("	<div id=""toplogin"">") & VbCrLf
	Response.Write("		<span>") & VbCrLf
	Response.Write("		<script type=""text/javascript"" src="""&Sitepath&"inc/date.js""></script>") & VbCrLf
	Response.Write("		</span>") & VbCrLf
	If useroff=1 then
	Response.Write("		<script type=""text/javascript"" src="""&SitePath&"inc/login.asp""></script>") & VbCrLf
	else
		Response.Write("		<SCRIPT language=javascript src="""&Sitepath&"inc/wealth.js""></SCRIPT><div id=Wealth></div><SCRIPT type=text/javascript>MiniSite.Weather.print(""Wealth"");</SCRIPT>") & VbCrLf
	End if
	Response.Write("	</div>") & VbCrLf
	Response.Write("	<div id=""logo"">") & VbCrLf
	Response.Write("		<a href=""http://"&SiteUrl&""&SitePath&"""><img src="""&SitePath&"images/logo.gif"" alt="""&SiteTitle&""" /></a>") & VbCrLf
	Response.Write("	</div>") & VbCrLf
	Response.Write("	<div id=""banner"">") & VbCrLf
	Call ShowAD(4)
	Response.Write("	</div>") & VbCrLf
	Response.Write("	<div id=""topright"">") & VbCrLf
	Response.Write("		<div class=""topright3""><script type=""text/javascript"" src="""&SitePath&"inc/skin.asp""></script><li class=""menu2"" onMouseOver=""mlist.style.display=''"" onMouseOut=""mlist.style.display='none'"" style=""cursor:hand;"">") & VbCrLf
	Response.Write("		<div id=""mlist"" style=""display:none;"">") & VbCrLf
set rs1=server.createobject("ADODB.Recordset")
sql1="select [ID],[Title] from "&tbname&"_Css"
rs1.open sql1,conn,1,3
NoI=0
do while not (rs1.eof or err) 
NoI=NoI+1
	Response.Write("<a href=""javascript:changecss('"&SitePath&"images/css"&rs1("ID")&".css')"">"&rs1("Title")&"</a><br />")
  rs1.movenext
  loop
  rs1.close
  set rs1=nothing
	Response.Write("</div></li><li><A href=""javascript:addfavorite()""></a></li><li><a id=""StranLink""></a></li><li><a href="""&SitePath&"sitemap.asp""></a></li></div><div id=""clear""></div>") & VbCrLf
	Response.Write("		<div class=""textad"">")
	Call ShowAD(10)
	Response.Write("	</div>") & VbCrLf
	Response.Write("	</div>") & VbCrLf
	Response.Write("</div>") & VbCrLf
	Response.Write("	<div id=""clear""></div>")
End function

Function Menu
%>
	<div id="webmenu">
		<ul>
			<%
set rs8=conn.execute("select [ID],[ClassName],[Num],[IsMenu],[link],[Url],[target] from "&tbname&"_Class Where IsMenu=1 order by num asc")
NoI=0
do while not rs8.eof
NoI=NoI+1%><li class="ldmc" id="ld<%=NoI%>"><%If rs8("num")<>1 then Response.Write(""&menuimg&"") end if%> <a href="<%
If rs8("link")=1 then
	Response.Write(laoy(rs8("url")))
Else
	If Html=3 then
 		Response.Write(""&SitePath&"Class_"&rs8("ID")&".html")
	Else
 		Response.Write(""&SitePath&"Class.asp?ID="&rs8("ID")&"")
	End if
End if%>" target="<%=rs8("target")%>"><%=rs8("ClassName")%></a><%If Mydb("Select Count([ID]) From ["&tbname&"_Class] Where TopID="&rs8("ID")&"",1)(0)>0 then%><div id="xmenu"><%
		    Sqlpp ="select [ID],[ClassName],[Num],[IsMenu],[link],[Url],[target] from "&tbname&"_Class Where TopID="&Rs8("ID")&" order by num"   
   			Set Rspp=server.CreateObject("adodb.recordset")   
   			rspp.open sqlpp,conn,1,1
			Do while not Rspp.Eof
%>
      <a href="<%=SitePath%><%=IIF(Html=3,"Class_"&rspp("ID")&".html","Class.asp?ID="&rspp("ID")&"")%>" target="<%=rspp("target")%>"><%=rspp("ClassName")%></a><%
			Rspp.Movenext   
      		Loop
   rspp.close
   set rspp=nothing
%>  
    </div><%end if%></li>
<%
rs8.movenext
loop
rs8.close
set rs8=nothing%>
<SCRIPT type=text/JavaScript>for(n=1;n<=<%=Mydb("Select Count([ID]) From ["&tbname&"_Class] Where IsMenu=1",1)(0)%>;n++)ldc(n,false);</SCRIPT>
			<%If rss=1 then%><li><a href="<%=SitePath%>Rss/Rss.xml" target="_blank"></a></li>
			<%End if%>
		</ul>
	</div>
	<div id="clear"></div>
    <%Call ShowAD(11)%>
<%
End function

Function Copy
	Response.Write("<div id=""clear""></div>") & VbCrLf
	Response.Write("<div id=""webcopy"">") & VbCrLf
	Response.Write("	<li>"&SiteTitle&"(<a href=""http://"&SiteUrl&""">"&SiteUrl&"</a>) &copy; "&year(Now)&" 版权所有 All Rights Reserved.</li>") & VbCrLf
	Response.Write("	<li>"&Sitelx&" <a href=""http://yxrd.edu.gdbnet.cn/"" target=""_blank"">"&SiteTcp&"</a></li>") & VbCrLf
	Call Label(2) '统计代码
	Response.Write("</div>") & VbCrLf
	Response.Write("<script language=""javascript"" src="""&SitePath&"inc/Std_StranJF.Js""></script>") & VbCrLf
	Response.Write("<div id=""clear""></div>") & VbCrLf
	Conn.Close : Set Conn = Nothing	
End function

Function search
	Response.Write("<div style=""float:right;margin-top:-5px;background:url("&SitePath&"images/search.jpg) left no-repeat;padding-left:100px;"">") & VbCrLf
	Response.Write("<form id=""form1"" name=""form1"" method=""post"" action="""&SitePath&"index.asp?action=search"" target=""_blank"">") & VbCrLf
	Response.Write("<input name=""KeyWord"" type=""text"" id=""KeyWord"" value="""&keyword&""" maxlength=""10"" size=""13"" class=""borderall"" style=""height:17px;""/>") & VbCrLf
	Response.Write("  <select name=""bbs"" id=""bbs"">") & VbCrLf
	Response.Write("    <option value=""1"">站内搜索</option>") & VbCrLf
	Response.Write("    <option value=""3"">百度搜索</option>") & VbCrLf
	Response.Write("    <option value=""4"">Google搜索</option>") & VbCrLf
	Response.Write("    <option value=""5"">youdao搜索</option>") & VbCrLf
	Response.Write("    <option value=""6"">雅虎搜索</option>") & VbCrLf
	Response.Write("  </select>") & VbCrLf
	Response.Write("<input type=""submit"" name=""Submit"" value=""搜 索"" class=""borderall"" style=""height:21px;""/>") & VbCrLf
	Response.Write("</form>") & VbCrLf
	Response.Write("</div>") & VbCrLf
End Function
%>