﻿﻿﻿﻿﻿
				 
//两边广告	
    var delta=0.015;
	var collection;
	var closeB=false;
	function floaters() {
		this.items	= [];
//		this.addItem	= function(id,x,y,width,height,background,Url,content)
//				  {
//					document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute; background-image: url('+ background +'); background-position: center bottom; layer-background-image: url('+ background +'); width:'+width+'px; height:'+height+'px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'; border: 1px none #000000; cursor:pointer"><div align="center" style="background-image: url(share_AD_Site_Close.gif); layer-background-image: url(share_AD_Site_Close.gif); width:100%; height:20px;"><table width="100%"  border="0" cellspacing="0" cellpadding="0"><tr><td align="right" height="20"><a onClick="closeBanner();"><img src="share_AD_Site_Botton.gif" width="11" height="11">&nbsp;</a></td></tr></table></div><div id="pop_left" style="width:100%; height:'+height+'px; z-index:8; overflow: auto;" onclick="window.open (\' '+Url+' \',\'\',\'\')">'+content+'</div></DIV>');
		this.addItem	= function(Visible,id,x,y,width,height,background,Url,content)
				{
					if(Visible)
						document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute; background-image: url('+ background +'); background-position: center bottom; layer-background-image: url('+ background +'); width:'+width+'px; height:'+height+'px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'; border: 1px none #000000; cursor:pointer"><div align="center" style="background-image: url(share_AD_Site_Close.gif); layer-background-image: url(share_AD_Site_Close.gif); width:100%; height:20px;"><table width="100%"  border="0" cellspacing="0" cellpadding="0"><tr><td align="right" height="20"><a onClick="closeBanner();"><img src="share_AD_Site_Botton.gif" width="11" height="11">&nbsp;</a></td></tr></table></div><div id="pop_left" style="width:100%; height:'+height+'px; z-index:8; overflow: auto;" onclick="window.open (\' '+Url+' \',\'\',\'\')">'+content+'</div></DIV>');
					else
						document.write('<DIV id='+id+' style="visibility:hidden; Z-INDEX: 10; POSITION: absolute; background-image: url('+ background +'); background-position: center bottom; layer-background-image: url('+ background +'); width:'+width+'px; height:'+height+'px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'; border: 1px none #000000; cursor:pointer"><div align="center" style=" visibility:hidden; background-image: url(share_AD_Site_Close.gif); layer-background-image: url(share_AD_Site_Close.gif); width:100%; height:20px;"><table style=" visibility:hidden;" width="100%"  border="0" cellspacing="0" cellpadding="0"><tr><td align="right" height="20"><a onClick="closeBanner();"><img src="share_AD_Site_Botton.gif" width="11" height="11">&nbsp;</a></td></tr></table></div><div id="pop_left" style="width:100%; height:'+height+'px; z-index:8; overflow: auto;" onclick="window.open (\' '+Url+' \',\'\',\'\')">'+content+'</div></DIV>');
			
					var newItem				= {};
					newItem.object			= document.getElementById(id);
					newItem.x				= x;
					newItem.y				= y;

					this.items[this.items.length]		= newItem;
				  }
		this.play	= function()
				  {
					collection				= this.items
					setInterval('play()',30);
				  }
		}
		function play()
		{
			if(screen.width<=800 || closeB)
			{
				for(var i=0;i<collection.length;i++)
				{
					collection[i].object.style.display	= 'none';
				}
				return;
			}
			for(var i=0;i<collection.length;i++)
			{
				var followObj		= collection[i].object;
				var followObj_x		= (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
				var followObj_y		= (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);

				if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {
					var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
					dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
					followObj.style.left=followObj.offsetLeft+dx;
					}

				if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
					var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
					dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
					followObj.style.top=followObj.offsetTop+dy;
					}
				followObj.style.display	= '';
			}
		}	
		function closeBanner()
		{
			closeB=true;
			return;
		}
							
						var theFloaters	= new floaters();
							
						var theFloatLeftWidth = 134;
						var theFloatLeftHight = 118;
						var theFloatLeftImg = 'UserADSiteLeft.gif';
						var theFloatLeftLink = 'http://www.hhhbm.com/page065822015815.aspx?RecordID=222da881-eb4c-4fcc-bdff-ac00cffea8ec';
						var theFloatLeftTextColor = 'Black';
						var theFloatLeftText = '泰山C型覆面吊顶龙骨    为镀锌轻钢龙骨构件，用于吊顶骨架中固定饰面板的构件。';
						theFloaters.addItem(true,'followDiv2',6,80,theFloatLeftWidth,theFloatLeftHight,theFloatLeftImg,theFloatLeftLink,'<table width="84%" border="0" align="center"><tr><td valign="top" align="left" style="line-height:1.2;font-size: 14px;word-break:break-all;"><font color="'+theFloatLeftTextColor+'">'+theFloatLeftText+'</font></td></tr></table>');
									
						var theFloatRightWidth = 134;
						var theFloatRightHight = 118;
						var theFloatRightImg = 'UserADSiteRight.gif';
						var theFloatRightLink = 'http://www.hhhbm.com/page064219034230.aspx?RecordID=504bf85c-0e9a-48f1-a5dc-aff0c4b1df4a';
						var theFloatRightTextColor = 'Black';
						var theFloatRightText = '泰山普通纸面石膏板  为象牙色面纸，无论是在其上涂刷底漆还是直接作为终饰表面均可获得理想的效果。 ';
						theFloaters.addItem(true,'followDiv1','document.body.clientWidth-106',80,theFloatRightWidth,theFloatRightHight,theFloatRightImg,theFloatRightLink,'<table width="84" border="0" align="center"><tr><td valign="top" align="left" style="line-height:1.2;font-size: 14px;word-break:break-all;"><font color="'+theFloatRightTextColor+'">'+theFloatRightText+'</font></td></tr></table>');
						theFloaters.play();
									
						theFloaters.play();	
							