// JScript source code

			var scrWidth,scrHeight;									// 客户端屏幕的宽、高
			var divWidth,divHeight;									// 悬浮窗的宽、高
			var offSetAcross,offSetVertical;						// 横向、纵向偏移量
			var idenInterval;										// 用于 cleatInterval 的识别编码		
			var iMilliSeconds;										// 轮回时间单位：毫秒
			var wState,hState;
			var count = 1;
			offSetAcross = 0,offSetVertical = 0;					// 初始化变量
			iMilliSeconds = 0,idenInterval = 0;										
			divWidth = 0,divHeight = 0;
			iMilliSeconds = 0;										// 设置轮回时间
			
			
			
			// 随机生成数
			function Gen_Integer()
			{
				if((offSetAcross -1) <=0)
				{
					wState = 0;
				}
				if((offSetVertical -1) <=0)
				{
					hState = 0;
				}
				if((offSetAcross + 1) >= (scrWidth - divWidth))
				{
					wState = 1;
				}
				if((offSetVertical + 1) >= (scrHeight - divHeight))
				{
					hState = 1;
				}
				
				
				if(wState == 1)
				{
					offSetAcross = offSetAcross - Math.random() * count;
				}
				else
				{
					offSetAcross = offSetAcross + Math.random() * count;
				}
				
				if(hState == 1)
				{
					offSetVertical = offSetVertical - Math.random() * count;
				}
				else
				{
					offSetVertical = offSetVertical + Math.random() * count;
				}
		
			}
			
			// 初始化
			function Set_Client(x,y,z,m)
			{
				divWidth = x;
				divHeight = y;
				iMilliSeconds = z;
				count = m;
				scrWidth = window.document.body.scrollWidth;
				scrHeight = window.document.body.scrollHeight;
				if(scrHeight < window.document.body.clientHeight)
					scrHeight = window.document.body.clientHeight;
				if(scrWidth < window.document.body.clientWidth)	
					scrWidth = window.document.body.clientWidth;
				
			}
			
			// 开始移动
			function Move_Div()
			{
				if(idenInterval==0)
				{
					idenInterval = window.setInterval("Move_Pic()",iMilliSeconds);
				}
			}
			
			// 调整DIV偏移量
			function Move_Pic()
			{
				Gen_Integer();
				movediv.style.left = offSetAcross;
				movediv.style.top = offSetVertical;
				
				 
			}
			
			// 停止移动
			function Stop_Div()
			{
				if(idenInterval!=0)
				{
					window.clearInterval(idenInterval);
					idenInterval = 0;
				}
			}
	
