﻿// JScript 文件

 var right_img='<table cellspacing="0" cellpadding="0" width="109" border="0"><tr><td colspan="3"><a onclick="CloseQQ()" href="javascript:;" shape="circle" coords="91,16,12"><img height="34" src="images/qq_top.gif" width="109" usemap="#Map" border="0"></a></td></tr>';
        right_img+='<tr>';
        right_img+='<td width="6"><img height="126" src="images/qq_life.gif" width="6"></td>';
        right_img+='<td valign="top" width="96" background="images/QQ背景.gif">';
        right_img+=' <table cellspacing="0" cellpadding="0" width="90" align="center" border="0">';
        right_img+='<tr>';
        right_img+=' <td height="30">';
        right_img+='<table cellspacing="0" cellpadding="0" width="90" border="0">';
        right_img+=' <tr>';
        right_img+=' <td>';
        right_img+='<img height="13" src="images/qq_ico1.gif" width="16"><span class="font_12"> ';
        right_img+='<span style="font-size: 9pt">QQ在线</span></span></td>';
        right_img+=' </tr>';
        right_img+='</table>';
        right_img+=' </td>';
        right_img+=' </tr>';
        right_img+='<tr>';
        right_img+='<td>';
        right_img+='<table border="0" width="100%" cellpadding="2" id="table47">';
        right_img+='<tr>';
        right_img+=' <td width="15" valign="top" height="23">';
        right_img+='<img border="0" src="images/qq_n01.gif" width="16" height="16"></td>';
        right_img+='<td valign="bottom"><a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin=776525728&Site=www.wwyi.com&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:45342521:10 alt="Alex"></a></td>';
        right_img+='</tr>';
        right_img+=' </table>';
        right_img+=' </td>';
        right_img+='</tr>';
        right_img+=' <tr>';
        right_img+=' <td></td>';
        right_img+=' </tr>';
        right_img+=' <tr>';
        right_img+='<td>';
        right_img+='<table border="0" width="100%" cellpadding="2" id="table47">';
        right_img+='<tr>';
        right_img+=' <td width="15" valign="top" height="23">';
        right_img+='<img border="0" src="images/qq_n01.gif" width="16" height="16"></td>';
        right_img+='<td valign="bottom"><a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin=401487468&Site=www.wwyi.com&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:45342521:10 alt="Alex"></a></td>';
        right_img+='</tr>';
        right_img+=' </table>';
        right_img+=' </td>';
        right_img+='</tr>';
        right_img+=' <tr>';
        right_img+=' <td></td>';
        right_img+=' </tr>';
        right_img+=' <tr>';
        right_img+='<td>';
        
        right_img+='</td>';
        right_img+='</tr>';
        right_img+='<tr>';
        right_img+=' <td></td></tr></table></td>';
        right_img+='<td width="7"><img height="126" src="images/qq_right.gif" width="7"></td>';
        right_img+='</tr>';
        right_img+=' <tr><td colspan="3"><img height="30" src="images/qq_bottom1.gif" width="109"></td></tr>';
        right_img+='<tr><td colspan="3"><img height="33" src="images/qq_logo.gif" width="109"></td></tr>';
        right_img+='</table>';
	var delta=0.05
	var collection;
	function floaters() {
		
		this.items	= [];
		this.addItem	= function(id,x,y,content)
				  {
//				   var back=document.getElementById(id);
//				   if(!back)
//                       back=document.createElement(id); 
//                     back.id=id;
//                    var styleStr='Z-INDEX: 10; POSITION: absolute;  width:80px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y); 

//                    back.style.cssText=styleStr; 
//                    back.innerHTML=content;
//                    document.body.appendChild(back); 
                    
                    document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute;  width:109px; height:100px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+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()
		{  	

			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.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	= '';
			}
		}	

	var theFloaters		= new floaters();
	theFloaters.addItem('followDiv1','document.body.clientWidth-109',100,''+right_img+'');
	theFloaters.play()
	
	
	function CloseQQ()
	{
	   document.getElementById("followDiv1").style.display="none";
	}

	
