var init_pos=document.getElementById('chatContainer').style.posTop ;  
function displaytopleft(){   
 cHeight = document.body.clientHeight;// 頁面的實際高度  
 var nowTop = 0;  
 //ie5.5 之后已经不支持document.body.scrollX对象了,所以要看其ie版本  
 if (document.body && document.body.scrollTop)  
 {  
	 nowTop=document.body.scrollTop;  
 }  
 if (document.documentElement && document.documentElement.scrollTop)  
 {  
 nowTop=document.documentElement.scrollTop;  
 }  
   
 lTop = nowTop+init_pos;  
 if(cHeight > lTop){  
	 document.getElementById('chatContainer').style.posTop=lTop ;  
 }  
}  
function topleft()   
{   
 // 使用setInterval或者setTimeout来不停的改变这个浮动层的位置   
 window.setInterval("displaytopleft()",10);   
}   
topleft();  
