	var theHandle = document.getElementById("handle");
        var theRoot   = document.getElementById("adBoxPopup");

	setTimeout("openPopupAd();", poptimer);

	Drag.init(theHandle, theRoot);

	var a=50;
	var pos = -180;
	TO = null;

	function shake(object,speed)
	{
	  obj = eval(object)

	  pos = pos + 15;
	  if(pos>(430-document.getElementById("adBoxPopupContent").clientHeight)){
            pos = (430-document.getElementById("adBoxPopupContent").clientHeight);
          }
	  obj.style.top = pos+'px';
	  obj = object
	  sp = speed
	  TO = setTimeout("shake(obj,sp)",speed);
	}
	function stopshake()
	{
		clearTimeout(TO);
		document.getElementById("adBoxPopup").style.top = (430-document.getElementById("adBoxPopupContent").clientHeight)+'px';
		document.getElementById("adBoxPopup").style.left = '825px';
	}

	function openPopupAd(){
            document.getElementById('adBoxPopup').style.display = '';
	    shake(document.getElementById("adBoxPopup"),75);
	    setTimeout("stopshake()",2500);
	}

        function closePopupAd()
        {
                document.getElementById('adBoxPopup').style.display = 'none';
        }


