
//左边 
//var left_img='<img src="images/jslx.gif"></EMBED>'; 

//右边 
var right_img='<img src="images/jslx1.gif"></EMBED>'; 
var delta=0.2 
var collection; 
function floaters() { 
this.items = []; 
this.addItem = function(id,x,y,content) 
{ 
document.write('<DIV id='+id+' style="Z-INDEX:900; POSITION: absolute; width:106px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'"><table border="0" cellpadding="0" cellspacing="0"><tr><td width="106" height="20" valign="top" background="images/mid001.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/up_001.gif"><tr><td height="71">&nbsp;</td></tr></table><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td height="3"></td></tr></table></td></tr><tr><td height="10" align="center" background="images/mid001.gif"><span style="color:#000000"><strong>客户服务</strong></span></td></tr><tr><td height="20" valign="top" background="images/mid001.gif"><a target="blank" href="http://wpa.qq.com/msgrd?V=1&amp;Uin=42770442&amp;Site=宏立电线&amp;Menu=yes"><b>&nbsp;&nbsp;<img border="0" src="images/qq.gif"/></b><font color="#000066">&nbsp;客服1</font></a></td></tr><tr><td height="30" background="images/mid001.gif"><a target="blank" href="http://wpa.qq.com/msgrd?V=1&amp;Uin=317517193&amp;Site=宏立电线&amp;Menu=yes"><b>&nbsp;&nbsp;<img src="images/qq.gif" border=0/></b><font color="#000066">&nbsp;客服2</font></a><br></td></tr><tr><td height="20" align="center" background="images/mid001.gif"><span style="color:#000000"><strong>销售热线</strong></span></td></tr><tr><td height="20" align="center" background="images/mid001.gif"><span style="color:#000000">0760-22362038<br>0760-22362533</span></td></tr><tr><td height="44" valign="top" background="images/bot_001.gif"></td></tr></table></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() 
{ 

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 = ''; 
} 
} 

var theFloaters = new floaters(); 
theFloaters.addItem('followDiv1','document.body.clientWidth-115',330,''+right_img+''); 
//theFloaters.addItem('followDiv2',5,90,''+left_img+''); 
theFloaters.play(); 

