﻿// JScript 文件
    var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;

imgUrl[1]="images/1.jpg";
imgLink[1]="http://www.youthfly.net";

imgUrl[2]="images/2.jpg";
imgLink[2]="http://www.youthfly.net/bt";

imgUrl[3]="images/3.jpg";
imgLink[3]="http://www.youthfly.net/bt1";

imgUrl[4]="images/4.jpg";
imgLink[4]="http://www.youthfly.net/bt2";

imgUrl[5]="images/5.jpg";
imgLink[5]="http://www.youthfly.net/bt3";


imgUrl[6]="images/6.jpg";
imgLink[6]="http://www.youthfly.net/bt3";

var imgPre=new Array();
var imgj=0;
for (imgi=1;imgi<7;imgi++) {
        if( (imgUrl[imgi]!="") && (imgLink[imgi]!="") ) {
                imgj++;
        } else {
                break;
        }
}
        function playTran(){
                if (document.all)
                {
                        document.getElementById("imgInit").filters[0].Apply();
                        document.getElementById("imgInit").filters[0].Play(duration=2);
                }
                        
        }
        var key=0;
        function nextAd(){
                if(adNum<imgj)adNum++ ;
                else adNum=1;
                
                if( key==0 ){
                        key=1;
                } else if (document.all){
                           playTran();
                }
               document.getElementById("imgInit").src=imgUrl[adNum];
                theTimer=setTimeout("nextAd()", 4000);
        }
        function goUrl(){
                jumpUrl=imgLink[adNum];
                jumpTarget='_blank';
                if (jumpUrl != ''){
                        if (jumpTarget != '') 
                        window.open(jumpUrl,jumpTarget);
                        else
                                location.href=jumpUrl;
        }
        }

