<%

Function GetUrl()
    GetUrl = "http://"&Request.ServerVariables("SERVER_NAME")&Request.ServerVariables("URL")
    If Request.ServerVariables("QUERY_STRING")<>"" Then GetURL = GetUrl&"?"& Request.ServerVariables("QUERY_STRING")
End Function

Dim searcher,leftcontact
searcher="<form id=""Search"" name=""Search"" method=""get"" action=""Search.Asp""><p><select name=""Range""> <option value=""Product"">产品信息</option><option value=""News"">新闻资讯</option><option value=""Down"">下载</option></select></p><p><input name=""Keyword"" type=""text"" id=""Keyword"" class=""search""  value=""请输入关键字""  onblur=""this.className='search';if(this.value==''){this.value='请输入关键字';}"" onfocus=""this.className='search';this.focus();if(this.value=='请输入关键字'){this.value='';}""  /></p><p><input name=""searchbutton"" type=""submit"" id=""searchbutton"" value="""" /></p></form>"
leftcontact="<p><span>地址: </span>$Address$<br /><span>电话: </span>021-58888888<br /><span>传真: </span>021-58888888<br /><span>手机: </span>13888888888<br /><span>邮箱: </span>$Email$</p>"


Function mainmenu(curID)
Dim rs,sql,str,AutoUrl
Str="<ul><li><a href=""index."&HTMLName&""" title=""网站首页"" "
if curid=0 then Str=Str&" id=""menu_selected"" "
Str=Str&"><span>网站首页</span></a></li>"
If ISHtml=0 then
	AutoUrl="about.asp"
else
	AutoUrl=""&AboutNameDiy&""&Separated&"1."&HTMLName&""
end if		
  Str=Str&"<li><a href='"&AutoUrl&"' title=""关于我们"" "
  if curid=1 then Str=Str&" id=""menu_selected"" " 
  Str=Str&"><span>关于我们</span></a>"
  sql="select ID,AboutName from ["&Datapre&"_About] order by OrderNum"
  set rs=db(sql,2)
  if not rs.eof then
  Str=Str&"<ul class=""menulevel"">"
  do while not rs.eof
  if IsHtml=0 then
  AutoUrl="About.asp?ID="&rs(0)&""
  else
  AutoUrl=""&AboutNameDiy&""&Separated&""&rs(0)&"."&HTMLName&""
  end if
  Str=Str&"<li><a href='"&AutoUrl&"' title='"&rs(1)&"'>"&rs(1)&"</a></li>"
  rs.movenext
  loop
  Str=Str&"</ul>"
  end if
  rs.close:set rs=nothing
  Str=Str&"</li>"
  if IsHtml=0 then
  AutoUrl="Productlist.asp"
  else
  AutoUrl=""&ProSortName&Separated&"1."&HTMLname&""
  end if
  Str=Str&"<li><a href="""&AutoUrl&""" title=""产品展示"" "
  if curid=2 then  Str=Str&" id=""menu_selected"" "
  Str=Str&" ><span>产品展示</span></a>"
  sql="select ID,SortName from ["&Datapre&"_ProductSort] order by ID"
  set rs=db(sql,2)
  if not rs.eof then
  Str=Str&"<ul class=""menulevel"">"
  do while not rs.eof
  if IsHtml=0 then
  AutoUrl="ProductList.asp?SortID="&rs(0)&""
  else
  AutoUrl=""&ProSortName&""&Separated&""&rs(0)&Separated&"1."&HTMLName&""
  end if
  Str=Str&"<li><a href='"&AutoUrl&"' title='"&rs(1)&"'>"&rs(1)&"</a></li>"
  rs.movenext
  loop
  Str=Str&"</ul>"
  end if
  rs.close:set rs=nothing
  Str=Str&"</li>"
  if IsHtml=0 then
  AutoUrl="Newslist.asp"
  else
  AutoUrl=""&NewSortName&Separated&"1."&HTMLname&""
  end if
  Str=Str&"<li><a href="""&AutoUrl&""" title=""新闻中心"" "
  if curid=3 then Str=Str&" id=""menu_selected"" " 
  Str=Str&"><span>新闻中心</span></a></li>"
  if IsHtml=0 then
  AutoUrl="Jobslist.asp"
  else
  AutoUrl=""&JobSortName&Separated&"1."&HTMLname&""
  end if
  Str=Str&"<li><a href="""&AutoUrl&""" title=""招聘信息"" "
  if curid=4 then Str=Str&" id=""menu_selected"" " 
  Str=Str&"><span>招聘信息</span></a></li>"
  if IsHtml=0 then
  AutoUrl="Downlist.asp"
  else
  AutoUrl=""&DownSortName&Separated&"1."&HTMLname&""
  end if
  Str=Str&"<li><a href="""&AutoUrl&""" title=""下载频道"" "
  if curid=5 then Str=Str&" id=""menu_selected"" " 
  Str=Str&"><span>下载频道</span></a></li>"
  Str=Str&"<li><a href=""MessageWrite.asp"" title=""留言反馈"" "
  if curid=6 then Str=Str&" id=""menu_selected"" " 
  Str=Str&"><span>留言反馈</span></a></li>"
  Str=Str&"<li><a href="""&OtherSortName&Separated&"1."&HTMLName&""" title=""其他信息"" "
  if curid=7 then Str=Str&" id=""menu_selected"" " 
  Str=Str&"><span>其他信息</span></a></li>"
  Str=Str&"<li><a href=""http://www.shiqinghuayi.cn"" target=""_blank"" title=""晴天博客""><span>诗情画意</span></a></li>"
 Str=Str&"</ul>"
 MainMenu=Str
End function


Function bannerpic(num)
Dim rs,sql,str
sql="select top "&num&" PicUrl,LinkUrl,Remark from ["&Datapre&"_FlashPic] where viewflag order by OrderNum"
set rs=db(sql,2)
str=""
if not rs.eof then
 do while not rs.eof
   str=str&"<a href='"&rs(1)&"'><img src='"&rs(0)&"' alt='"&rs(2)&"' width='950' height='152' /></a>"
 rs.movenext
 loop
end if
rs.close:set rs=nothing
bannerpic=str
end function

'通用当前分类位置函数 调用方法：getlocation(分类表名,分类ID,分类路径,页面名)
function getlocation(Datafrom,ID,SortPath,ClassName,DIYName)
Dim rs,sql,str,AutoUrl,i,SortName
if sortpath="" or sortpath="0," then
getlocation=""
else
	str=split(SortPath,",")
	for i=1 to Ubound(str)-1
		SortName=db("select SortName from ["&Datapre&"_"&Datafrom&"] where ID="&str(i)&"",1)(0)
		if IsHTML=1 then
		AutoUrl=""&DIYName&""&Separated&ID&Separated&"1."&HTMLName&""
		else
		AutoUrl=""&ClassName&".asp?SortID="&str(i)&""
		end if
 	getlocation=getlocation&"&gt;&gt; <a href='"&AutoUrl&"' title='"&SortName&"'>"&SortName&"</a>"
 	next
end if
end function
Function PrintText(stringText)
Response.write(stringText)
End Function

%>