    var timeaddhead = 250;
    var hideaddhead = 0;
    function addCount()
    {
        if(timeaddhead>0)
        {
            timeaddhead--;
            hideaddhead = hideaddhead+20;
        }
        else
        {
            return;
        }
        if(hideaddhead>290)  //高度
        {
            return;
        }
        document.getElementById("adsHead").style.display = "";
        document.getElementById("adsHead").style.height = hideaddhead+"px";
        setTimeout("addCount()",30);
    }
    
	/*
    window.onload = function showadsHead()
    {
        if(document.getElementById("adsHead")){
			addCount();
        	setTimeout("noneadsHead()",9000); //停留时间自己适当调整
		}
    }
	*/
	function showadsHead()
    {
        if(document.getElementById("adsHead")){
			addCount();
        	setTimeout("noneadsHead()",9000); //停留时间自己适当调整
		}
    }
	if (document.all){
		window.attachEvent('onload',showadsHead);//IE中
	}else{
		window.addEventListener('load',showadsHead,false);//firefox
	}
	
    var TimeHead = 250;
    var NoteHead = 290; //高度
    function noneadsHead()
    {
        if(TimeHead>0)
        {
            TimeHead--;
            NoteHead = NoteHead-15;
        }
        else
        {
            return;
        }
        if(NoteHead<0)
        {
            document.getElementById("adsHead").style.display = "none";
            return;
        }
        
        document.getElementById("adsHead").style.height = NoteHead+"px";
        setTimeout("noneadsHead()",30);
    }
	function closeBox(){document.getElementById("adsHead").style.display="none";} 

