 var intervalIddd = null;
 function slideAd(id1,nStayTime,sState,nMaxHth,nMinHth)
 {
  document.getElementById('MyMoveAd').style['display']='block';
  this.stayTime=nStayTime*1000 || 3000;
  this.maxHeigth=nMaxHth || 338;
  this.minHeigth=nMinHth || 0;
  this.state=sState || "down" ;
  var obj1 = document.getElementById(id1);
  if(intervalIddd != null)
  {
   window.clearInterval(intervalIddd);
  }

  function openBox()
  {
   var h1 = obj1.offsetHeight;
   obj1.style.height = ((this.state == "down") ? (h1 + 40) : (h1 - 40))+"px";
   if(obj1.offsetHeight>this.maxHeigth)
   {
    window.clearInterval(intervalIddd);
    intervalIddd=window.setInterval(closeBox,this.stayTime);
   }
   if (obj1.offsetHeight<this.minHeigth)
   {
    window.clearInterval(intervalIddd);
    obj1.style.display="none";
	
   }
  }

  function closeBox()
  {
   slideAd(id1,this.stayTime,"up",nMaxHth,nMinHth);
   document.getElementById('MyMoveAd').style['display']='none';
  }

  intervalIddd = window.setInterval(openBox,1);
 }

 function showAd()
 {
  slideAd('MyMoveAd',8);
 }