zwei1121

博客园 首页 新随笔 联系 订阅 管理

 <script type="text/javascript">

        var bannerAD = new Array();
        var bannerADlink = new Array();
        var adNum = 0;


        bannerAD[0] = "/images/golf/flash_ftm.jpg";
        bannerADlink[0] = ""

        bannerAD[1] = "/images/golf/flash_ftm02.jpg";
        bannerADlink[1] = ""


        bannerAD[2] = "/images/golf/golf01.jpg";
        bannerADlink[2] = ""

        bannerAD[3] = "/images/golf/golf02.jpg";
        bannerADlink[3] = "";

        var preloadedimages = new Array();
        for (i = 1; i < bannerAD.length; i++) {
            preloadedimages[i] = new Image();
            preloadedimages[i].src = bannerAD[i];
        }

        function setTransition() {
            if (document.all) {

                aspnetForm.bannerADrotator.filters.revealTrans.Transition = Math.floor(Math.random() * 23);
                aspnetForm.bannerADrotator.filters.revealTrans.apply();
            }
        }

        function playTransition() {
            if (document.all)
                aspnetForm.bannerADrotator.filters.revealTrans.play()
        }

        function nextAd() {

            if (adNum < bannerAD.length - 1) adNum++;
            else adNum = 0;
            setTransition();
            document.images.bannerADrotator.src = bannerAD[adNum];


            playTransition();
            theTimer = setTimeout("nextAd()", 5000);
        }

        function jump2url() {
            jumpUrl = bannerADlink[adNum];
            jumpTarget = '_blank';
            if (jumpUrl != '') {
                if (jumpTarget != '') window.open(jumpUrl, jumpTarget);
                else location.href = jumpUrl;
            }
        }
        function displayStatusMsg() {
            status = bannerADlink[adNum];
            document.returnValue = true;
        }
    </script>


    <script type="text/javascript"> Start()</script>
   
    <div id="health_right">
        <img src="http://images.cnblogs.com/golf/flash_ftm.jpg"
            name="bannerADrotator" id=img1 border="0" align="center" style="filter: revealTrans(duration=2,transition=40)" />
    </div>


<script language="javascript">
        function Pause(obj, iMinSecond) {
            if (window.eventList == null) window.eventList = new Array();
            var ind = -1;
            for (var i = 0; i < window.eventList.length; i++) {
                if (window.eventList[i] == null) {
                    window.eventList[i] = obj;
                    ind = i;
                    break;
                }
            }

            if (ind == -1) {
                ind = window.eventList.length;
                window.eventList[ind] = obj;
            }
            setTimeout("GoOn(" + ind + ")", iMinSecond);
        }


        function GoOn(ind) {
            var obj = window.eventList[ind];
            window.eventList[ind] = null;
            if (obj.NextStep) obj.NextStep();
            else obj();
        }

        function Start() {
            Pause(this, 1000); //调用暂停函数
            this.NextStep = function() {
                nextAd();
            }
        } 
    </script>

 

posted on 2009-09-17 16:01  zwei  阅读(212)  评论(0编辑  收藏  举报