document.write('<DIV id="AdLayer21" style="Z-INDEX: 100; POSITION: absolute;  visibility: visible;"><div id="ap1_1" style="position:relative; width:px; height:px; z-index:99;"><div id="ap1_2" style="position:absolute; width:px;	height:px;	z-index:98; left: 0px;	top: 0px; filter:alpha(opacity=0); background-color:#0C9; cursor:pointer;" onClick="window.open(\'http://localhost:2176/ad/click.aspx?id=1\');"></div><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="" height=""><param name="movie" value="/upload/2013-08-12/221621250.png"><param name="quality" value="high"><param name="wmode" value="transparent"><embed src="/upload/2013-08-12/221621250.png" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="" height=""></embed></object></div><div align="center"><a target="_self" href="javascript:closeDiv21();">关闭</a></div></div>');
var xPos = 300;
var yPos = 200; 
var step = 1;
var delay = 30; 
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
AdLayer21.style.top = yPos;
function closeDiv21(){
	AdLayer21.style.visibility='hidden';
}
function changePos() 
{
	width = document.body.clientWidth;
	height = document.body.clientHeight;
	Hoffset = AdLayer21.offsetHeight;
	Woffset = AdLayer21.offsetWidth;
	AdLayer21.style.left = xPos + document.body.scrollLeft;
	AdLayer21.style.top = yPos + document.body.scrollTop;
	if (yon) 
		{yPos = yPos + step;}
	else 
		{yPos = yPos - step;}
	if (yPos < 0) 
		{yon = 1;yPos = 0;}
	if (yPos >= (height - Hoffset)) 
		{yon = 0;yPos = (height - Hoffset);}
	if (xon) 
		{xPos = xPos + step;}
	else 
		{xPos = xPos - step;}
	if (xPos < 0) 
		{xon = 1;xPos = 0;}
	if (xPos >= (width - Woffset)) 
		{xon = 0;xPos = (width - Woffset);   }
	}
	
	function start()
	 {
	 	AdLayer21.visibility = "visible";
		interval = setInterval('changePos()', delay);
	}
	function pause_resume() 
	{
		if(pause) 
		{
			clearInterval(interval);
			pause = false;}
		else 
		{
			interval = setInterval('changePos()',delay);
			pause = true; 
			}
		}
	start();