日期:2014-05-16  浏览次数:20324 次

请高手帮忙解决,十分急
如何把下面的代码变成淡入淡出的

<!--begin:图片轮换开始-->
<script   language=JavaScript>
var   imgUrl=new   Array();
var   imgLink=new   Array();
var   imgTz=new   Array();
var   buttonShow=1;
var   buttonPos=1;
var   buttonX;
var   buttonY;
var   bakularCode= " "
var   adNum=0;
var   dakularCode= " ";
imgUrl[1]= "http://www.icxo.com/images/focus/shandong.jpg ";
imgLink[1]= "http://finance.icxo.com/htmlnews/2005/09/07/661868.htm ";
imgTz[1]= "半年收本QQ抢占沪黑市场 ";
imgUrl[2]= "http://www.icxo.com/images/focus/hai.jpg ";
imgLink[2]= "http://finance.icxo.com/htmlnews/2005/09/02/659032.htm ";
imgTz[2]= "傅成玉反思中海油收购案 ";
imgUrl[3]= "http://www.icxo.com/images/focus/shiyou.jpg ";
imgLink[3]= "http://finance.icxo.com/htmlnews/2005/09/07/662140.htm ";
imgTz[3]= "煤变油成新一轮资源浪费? ";
imgUrl[4]= "http://www.icxo.com/images/focus/shandong.jpg ";
imgLink[4]= "http://finance.icxo.com/htmlnews/2005/09/05/660108.htm ";
imgTz[4]= "山东高耗能GDP跃进难再现 ";
var   imgPre=new   Array();
for   (i=1;i <8;i++)
{
imgPre[i]=new   Image();
imgPre[i].src=imgUrl[i];
}
function   setTransition()
{
if   (document.all)
{
imgUrlrotator.filters.revealTrans.Transition=23;//Math.floor(Math.random()*23)
imgUrlrotator.filters.revealTrans.apply();
}
}
function   playTransition()
{
if   (document.all)
imgUrlrotator.filters.revealTrans.play()
}

function   setNextAdNum(){
if(adNum <imgUrl.length-1)
adNum++   ;
else
adNum=1;
}
function   setPrevAdNum(){
if(adNum <=1)
adNum=imgUrl.length-1   ;
else
adNum--;
}


function   nextAd(toNum)
{
if(adNum <imgUrl.length-1)
adNum++   ;
else
adNum=1;
if(toNum!=null)   adNum=toNum;
setTransition();
document.images.imgUrlrotator.src=imgUrl[adNum];
document.getElementById( 'linktext ').innerHTML=imgTz[adNum];
document.images.imgUrlrotator.alt= '今日头条: '+imgTz[adNum];
document.getElementById( 'linktext ').innerHTML= " <a   href= "+imgLink[adNum]+ "   target=_blank   class=px14-lh20> "+imgTz[adNum]+ " </a> ";  
playTransition();
checkButton();
//   alert(adNum);
if(toNum!=null)
{toNum=null;theTimer=setTimeout( "nextAd() ",   3000);}
else
{theTimer=setTimeout( "nextAd() ",   3000);}
}
function   jump2url()
{
jumpUrl=imgLink[adNum];jumpTarget= '_blank ';
if   (jumpUrl   !=   ' ')
{   if   (jumpTarget   !=   ' ')
window.open(jumpUrl,jumpTarget);
else   location.href=jumpUrl;
}
}
function   displayStatusMsg()
{
status=imgLink[adNum];
document.returnValue   =   true;
}
function   checkButton()
{
for(i=1;i <=imgUrl.length-1;i++)
{if(i==adNum)
//document.getElementById( 'bt '+i).style.backgroundColor= '#00FF00 ';
eval( "bt "+i+ ".style.backgroundColor= '#9B0000 ';bt "+i+ ".style.color= '#FFFFFF '; ");
else
eval( "bt "+i+ ".style.backgroundColor= '#CCCCCC ';bt "+i+