	var topAdtime1 = 500;
	var topAdtime2=16000;  //停留时间自己适当调整
    var h1 = 0;
	var adheight=505;
	var obj="topAd"
      
    function addCount()
    {
		
	  if(topAdtime1>0)
        {
            topAdtime1--;
            h1 = h1+5;
			
        }
        else
        {
            return;
        }
        if(h1>=adheight)  //高度
        {
            return;
        }
		
        document.getElementById(obj).style.display = "";
        document.getElementById(obj).style.height = h1+"px";
		
        setTimeout("addCount()",30); 
		
    }
    
	function adTop()
    {
        addCount();
        setTimeout("noneAds()",topAdtime2);
    }

    

    var T = adheight;
    var N = adheight; //高度
    function noneAds()
    {
		
        if(T>0)
        {
            T--;
            N = N-5;
        }
        else
        {
            return;
        }
        if(N<=0)
        {
            document.getElementById(obj).style.display = "none";
            return;
        }
        
        document.getElementById(obj).style.height = N+"px";
        setTimeout("noneAds()",30); 
    }


