
<div id="@divx" style="position:fixed;_position:absolute;">
<a href="@inserturl" target="_blank">
<img src="@insertimg" title="@title" border="0" width="@width" height="@height" />
</a><a href="javascript:close@divx();" class="adclose">close</a>
</div>

<script type="text/javascript"> 
var itl;
	var xin = true, yin = true 
	var step = 1 
	var delay = 20 
	$("#@divx").find('img').load(function(){
	    var x = Math.ceil(Math.random()*1000),y = Math.ceil(Math.random()*1000);
		var float = function(){
			var L = T = 0;
			var OW = $("#@divx").width();//当前广告的宽
			var OH = $("#@divx").height();//高
			var DW = $(document).width(); //浏览器窗口的宽
			var DH = $(window).height(); 
			 x = x + step *( xin ? 1 : -1 ); 
			if (x < L) { 
				xin = true; x = L
			} 
			if (x > DW-OW-1){//-1为了ie
				xin = false; x = DW-OW-1
			} 
			y = y + step * ( yin ? 1 : -1 ); 
			if (y > DH-OH-1) { 
				yin = false; y = DH-OH-1 ;
			}
			if (y < T) {        
				yin = true; y = T
			} 
			var left = x ; 
			var top = y; 
			$("#@divx").css({'top':top,'left':left});
		}
		itl = setInterval(float,delay);
		$("#@divx").mouseover(function(){clearInterval(itl)}); 
		$("#@divx").mouseout(function(){itl=setInterval(float, delay)} )
	});
	
function close@divx()
{
    $("#@divx").hide();
    $("#@divx").mouseout=function(){}
	clearInterval(itl);
}
</script>
<!-- adimageClose1 author:hezl -->