var delta=0.15
var collection;
var closeB=false;
function floaters(){
this.items=[];
this.addItem=function (id,x,y,content)
{
   document.write('<DIV id='+id+' style="text-align:left;Z-INDEX: 10; POSITION: absolute; width:240px; height:160px;left:'+(typeof (x)=='string'?eval(x):x)+'px;top:'+(typeof (y)=='string'?eval(y):y)+'px">'+content+'</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()',10);
}
}

function play()
{
	if(screen.width<=648||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);
			followObj_x = followObj_x<0 ? document.body.clientWidth + followObj_x : followObj_x
		var followObj_y=(typeof (collection[i].y)=='string'?eval(collection[i].y):collection[i].y);

		if(followObj.offsetLeft!=(document.documentElement.scrollLeft+followObj_x))
		{
			var dx=(document.documentElement.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.documentElement.scrollTop+followObj_y))
		{
			var dy=(document.documentElement.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();
qqShow = ""
qqShow += ' <a href="http://sighttp.qq.com/cgi-bin/check?sigkey=7c47483545e48a1439abd33870debe8c1b565e76ca0b42f440358de94b3a00b8"; target=_blank;  ><img border="0" SRC="images/on_3.jpg" alt="在线咨询"></a><br><br>'
qqShow += '<a href="http://qtt.tq.cn/leavemsg.do?uin=8137038&page=http%3A//www.cd-accp.net/zxjj_ml.htm&localurl=http://www.cd-accp.net/zxjj_ml.htm&ltype=0" target="_blank"><img src="images/on_2.jpg" border=0></a>'




syShow = ''
syShow += '<TABLE cellspacing="0" cellpadding="0"  width=242 style="padding-top:3px">'

syShow += '<TR>'
syShow += '<Td>'
syShow += '<object id="top" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" height="210" width="236" align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">'
syShow += '				<param value="sameDomain" name="allowScriptAccess">'
syShow += '				<param value="images/sy.swf" name="movie">'
syShow += '				<param value="high" name="quality">'
syShow += '				<param name="wmode" value="transparent">'
syShow += '				<embed src="images/sy.swf" quality="high" width="236" height="210" name="成都名流" align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'
syShow += '			</object>'
syShow += '</Td>'
syShow += '</TR>'
syShow += '</TABLE>'
theFloaters.addItem('followDiv2',5,80,qqShow);
//theFloaters.addItem('followDiv1','document.body.clientWidth-100',150,'');
leftP = -255
theFloaters.addItem('followDiv1',leftP,60,syShow);
theFloaters.play();

