var imgUrl=new Array(); 
var imgLink=new Array(); 
var adNum=0; 
var it=1;
imgUrl[it]="ad/1.jpg"; 
imgLink[it++]="download.aspx?softid=818"; 
imgUrl[it]="ad/2.jpg"; 
imgLink[it++]="download.aspx?softid=823"; 
imgUrl[it]="ad/3.jpg"; 
imgLink[it++]="download.aspx?softid=825"; 
imgUrl[it]="ad/4.jpg"; 
imgLink[it++]="download.aspx?softid=824"; 


//imgUrl[it]="ad/3.gif"; 
//imgLink[it++]="download.aspx?softid=1"; 


var imgPre=new Array(); 
var j=0; 
for (i=1;i<=4;i++) {     //i±íÊ¾¸öÊý
if( (imgUrl[i]!="") && (imgLink[i]!="") ) { 
j++; 
} else { 
break; 
} 
} 

nextAd();

function playTran(){ 
if (document.all){ 
document.getElementById('imgInit').filters[0].play(); 
} 
} 

function nextAd(){ 
if(adNum<j)adNum++ ; 
else adNum=1; 
//alert(document.getElementById("imgInit"));
if (document.all){ 
document.getElementById('imgInit').filters[0].Transition=26; 
document.getElementById('imgInit').filters[0].apply(); 
} 
document.getElementById('imgInit').src=imgUrl[adNum];
//document.images.imgInit.src=imgUrl[adNum]; 
playTran(); 
theTimer=setTimeout("nextAd()", 3000); 
} 
function goUrl(){ 
jumpUrl=imgLink[adNum]; 
jumpTarget='_self'; 
if (jumpUrl != ''){ 
if (jumpTarget != '') 
window.open(jumpUrl,jumpTarget); 
else 
location.href=jumpUrl; 
} 
} 