请哪位高手帮我把下面的VBScript改成javascript,在下感激不尽!
<script language="VBScript">
function display1(num)
dim imagename
dim name
dim total
if(num<10) then
if document.all("subtree"+chr(48+num)).style.display="none" then
document.all("subtree"+chr(48+num)).style.display=""
document.all("image"+chr(48+num)).src="image/t_sub.gif"
document.all("img"+chr(48+num)).src="image/open.gif"
else
document.all("subtree"+chr(48+num)).style.display="none"
document.all("image"+chr(48+num)).src="image/t_plus.gif"
document.all("img"+chr(48+num)).src="image/close(1).gif"
end if
end if
if(num>9) then
if document.all("subtree"+chr(49)+chr(48+num-10)).style.display="none" then
document.all("subtree"+chr(49)+chr(48+num-10)).style.display=""
document.all("image"+chr(49)+chr(48+num-10)).src="image/t_sub.gif"
document.all("img"+chr(49)+chr(48+num-10)).src="image/open.gif"
else
document.all("subtree"+chr(49)+chr(48+num-10)).style.display="none"
document.all("image"+chr(49)+chr(48+num-10)).src="image/t_plus.gif"
document.all("img"+chr(49)+chr(48+num-10)).src="image/close(1).gif"
end if
end if
end function
</script>