﻿
Function showlink(a)

	For i = 1 To 4
		
		Set objlink = document.getelementbyid("link0"&i)
		If objlink.title = a.innertext Then
			objlink.style.display = ""
		Else
			objlink.style.display = "none"
		End If
		
	Next
End Function

Function shownewgif(a)
	If DateDiff("d", Now, a.d) >-3 Then
		If InStr(a.src,"null.gif") Then
			a.src = replace(a.src,"null.gif","new1.gif")
		End If
	End If
End Function


Function shownewgif2(a)
	If DateDiff("d", Now, a.d) >-3 Then
		If InStr(a.src,"null.gif") Then
			document.all(a.sourceindex-1).style.color="#0031C2"
			'a.src = replace(a.src,"null.gif","new1.gif")
		End If
	End If
End Function




		Function ShowDate(a)
			Dim today
			today = now()
			week1 = "日,一,二,三,四,五,六"
			week2 = split(week1,",")
			today1 = split(today,"-")
			ShowDate = Year(today)&"年"&Month(today)&"月"&Day(today)&"日 "&" 星期"&week2(a-1)
			
		End Function
		
sub window_onload2()  '启用可以在图片上增加上下图片功能

	if document.getelementbyid("piccontent") <> "null" then
		set infopics = document.getelementbyid("piccontent").all.tags("img")
		for i = 0 to infopics.length -1
			Set objimg = Document.CreateElement("Input")
			objimg.type = "image"
			objimg.src = "/images/go1.gif"
			objimg.value = ">"
			objimg.title = document.getelementbyid("pageshang").href
			objimg.style.position = "relative"
			objimg.style.top = cint(infopics(i).Height)/2-20
 			objimg.style.margintop = cint("-"&infopics(i).Height) 
			Call objimg.attachEvent("onclick",GetRef("clickA"))
			call infopics(i).insertAdjacentElement("afterEnd",objimg)

			Set objimg2 = Document.CreateElement("Input")
			objimg2.type = "image"
			objimg2.src = "/images/go2.gif"
			objimg2.value = "BACK"
			objimg2.title = document.getelementbyid("pagexia").href
			objimg2.style.position = "relative"
			objimg2.style.top = cint(infopics(i).Height)/2-20
			objimg2.style.margintop = cint("-"&infopics(i).Height)
			Call objimg2.attachEvent("onclick",GetRef("clickA"))
			call infopics(i).insertAdjacentElement("beforeBegin",objimg2) 
			
		next
		
	end if

	

end sub

function clickA() 
	 window.location.href = trim(window.event.srcelement.title)
end function 


