﻿    var time = 500;
    var h = 0;
    function addCount()
    {
        if(time>0)
        {
            time--;
            h = h+5;
        }
        else
        {
            return;
        }
        if(h>445)  //高度
        {
            return;
        }
        document.getElementById("indexads").style.display = "";
        document.getElementById("indexads").style.height = h+"px";
        setTimeout("addCount()",30); 
    }
    
    window.onload = function showAds()
    {
        //addCount();   /去掉慢慢出来
        setTimeout("noneAds()",15000); //停留时间自己适当调整
    }


    var T = 455;
    var N = 455; //高度
    function noneAds()
    {
        if(T>0)
        {
            T--;
            N = N-5;
        }
        else
        {
            return;
        }
        if(N<5)
        {
            document.getElementById("indexads").style.display = "none";
            return;
        }
        document.getElementById("indexads").style.height = N+"px";
        setTimeout("noneAds()",30); 
    }
