var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;
imgUrl[1]="./images/jj/1.jpg";
imgLink[1]="./picture.php?type=1";
imgUrl[2]="./images/jj/2.jpg";
imgLink[2]="./picture.php?type=1";
imgUrl[3]="./images/jj/3.jpg";
imgLink[3]="./picture.php?type=1";
imgUrl[4]="./images/jj/4.jpg";
imgLink[4]="./picture.php?type=1";
imgUrl[5]="./images/jj/5.jpg";
imgLink[5]="./picture.php?type=1";
imgUrl[6]="./images/jj/6.jpg";
imgLink[6]="./picture.php?type=1";
imgUrl[7]="./images/jj/7.jpg";
imgLink[7]="./picture.php?type=1";
var imgPre=new Array();
var j=0;
for (i=1;i<=7;i++) {
if( (imgUrl[i]!="") && (imgLink[i]!="") ) {
j++;
} else {
break;
}
}
function playTran(){
if (document.all){
document.imgInit.filters[0].play();
}
}
function nextAd(){
if(adNum<j)adNum++ ;
else adNum=1;
if (document.all){
document.imgInit.filters[0].Transition=26;
document.imgInit.filters[0].apply();
}
document.images.imgInit.src=imgUrl[adNum];
playTran();
theTimer=setTimeout("nextAd()", 4000); //两秒周期 循环调用本身( nextAd() )
}
function goUrl(){
jumpUrl=imgLink[adNum];
jumpTarget='_blank';
if (jumpUrl != ''){
if (jumpTarget != '') //相当于a标签的target属性，如果有指定则新开窗口
window.open(jumpUrl,jumpTarget);
else //没有指定target属性则在本窗口打开
location.href=jumpUrl;
}
}

