
    var time = 1000;
    var h = 500;
    function addCount()
    {
        if(time>0)
        {
            time--;
        }
        else
        {
            return;
        }
        document.getElementById("ShowPic").style.display = "";
        document.getElementById("ShowPic").style.height = h+"px";
    }
    
    window.onload = function showAds()
    {
        if(document.getElementById("ShowPic"))
        {
        addCount();
        setTimeout("noneAds()",(window.document.getElementById('heka').TotalFrames)*84); //停留时间自己适当调整
        }
        else
        {
            return;
        }
    }
    var T = 10;
    var N = 500; //高度
    
    function noneAds()
    {
        window.document.getElementById('heka').StopPlay();
        if(T>0)
        {
            T--;
            N = N-80;
        }
        else
        {
            return;
        }
        if(N<0)
        {
            document.getElementById("ShowPic").style.display = "none";
            return;
        }
        
        document.getElementById("ShowPic").style.height = N+"px";
        setTimeout("noneAds()",30); 
    }