sub scroll_layer() '滚动图层
layer2.style.top=layer_top(1)-1 '每次向上滚动1个象素
layer_top(1)=layer_top(1)-1
layer3.style.top=layer_top(2)-1
layer_top(2)=layer_top(2)-1
if layer_top(2)<>0 and layer_top(1)<>0 then
settimeout "scroll_layer",5 '每5毫秒滚动一次
else
change_disp '改变图层的显示方式
end if
end sub
sub change_disp() '改变图层的显示方式
dim top_value_tmp '临时存储图层TOP值
dim value_top_2,value_top_3 'layer2,layer3的最终top数值
top_value_tmp=layer2.style.top
value_top_2=split_layer_top(top_value_tmp) '解析top值
top_value_tmp=layer3.style.top
value_top_3=split_layer_top(top_value_tmp) '解析top值
if value_top_3<value_top_2 then
move_layer3 '移动图层3
else
move_layer2 '移动图层2
end if
settimeout "scroll_layer",2000 '延时2秒后滚动图层
end sub
sub move_layer2() '移动图层2
layer2.style.visibility="hidden"
layer2.style.top="438px"
layer_top(1)=438
layer2.style.visibility="visible"
end sub
sub move_layer3() '移动图层3
layer3.style.visibility="hidden"
layer3.style.top="438px"
layer_top(2)=438
layer3.style.visibility="visible"
end sub
function split_layer_top(top_value) '解析层的top值取得它的相应数值
dim tmp_value
tmp_value=left(top_value,len(top_value)-2)
split_layer_top=cint(tmp_value)
end function
-->
</script>
</body>
</html>