<script> <BR>function f(){ <BR> var g_sec=3 //几秒后切换图片 <BR> var g_items=new Array() <BR> var g_div=document.getElementById("g_div") <BR> var g_img=document.getElementById("g_img") <BR> var g_imglink=g_img.parentElement <BR> var arr=g_div.getElementsByTagName("A") <BR> var arr_length=arr.length <BR> var g_index=1 <br><br> var show_img=function(n){ <BR> if (/\d+/.test(n)){ <BR> var prev=g_index+1 <BR> g_index=n-1 <BR> }else{ <BR> var prev=(g_index>arr.length)?(arr_length-1):g_index+1 <BR> g_index=(g_index<arr_length-2)?(++g_index):0 <BR> } <BR> if (document.all){ <BR> g_img.filters.revealTrans.Transition=23; <BR> g_img.filters.revealTrans.apply(); <BR> g_img.filters.revealTrans.play(); <BR> } <BR> arr[prev].className="b" <BR> arr[g_index+1].className="bhover" <BR> g_img.src=g_items[g_index].img.src <BR> g_img.title=g_items[g_index].txt <BR> g_imglink.href=g_items[g_index].url <BR> g_imglink.target=g_items[g_index].target <br><br> } <br><br> for(var i=1;i<arr_length;i++){ <BR> g_items.push({txt:arr[i].innerHTML, <BR> url:arr[i].href, <BR> target:arr[i].target, <BR> img:(function(){var o=new Image;o.src=arr[i].getAttribute("for");return o})()}) <BR> arr[i].title=arr[i].innerHTML <BR> arr[i].innerHTML=[i," "].join("") <BR> arr[i].className="b" <BR> arr[i].onclick=function(){ <BR> event.returnValue=false; <BR> show_img(event.srcElement.innerText) <BR> } <BR> } <BR> show_img(1) <BR> var t=window.setInterval(show_img,g_sec*1000) <BR> g_img.onmouseover=function(){window.clearInterval(t)} <BR> g_img.onmouseout=function(){t=window.setInterval(show_img,g_sec*1000)} <BR>} <br><br>window.attachEvent("onload",f) <BR></script>