-
<腳本語言=“javascript”類型=“text/Javascript”>
函數 getClientBounds()
{
var 用戶端寬度;
var 客戶端高度;
如果($.browser.msie)
{
clientWidth = document.body.clientWidth;
clientHeight = document.body.clientHeight;
}
否則如果($.browser.safari)
{
clientWidth = window.innerWidth;
clientHeight = window.innerHeight;
}
else if ($.browser.Opera)
{
clientWidth = Math.min(window.innerWidth,
文件.body.clientWidth);
clientHeight = Math.min(window.innerHeight,
文檔.body.clientHeight);
}
別的
{
clientWidth = Math.min(window.innerWidth,
文件.documentElement.clientWidth);
clientHeight = Math.min(window.innerHeight,
文件.documentElement.clientHeight);
}
回傳 { 寬度:客戶端寬度,高度:客戶端高度 };
}
函數重設LiveMessengerPosition()
{
var clientBounds = getClientBounds();
var container = document.getElementById("liveMessengerContainer");
var scrollLeft = (document.documentElement.scrollLeft ?
document.documentElement.scrollLeft : document.body.scrollLeft);
var scrollTop = (document.documentElement.scrollTop ?
文件.documentElement.scrollTop : 文檔.body.scrollTop);
varcontainerLeft=scrollLeft+clientBounds.width-
容器.clientWidth – 5;
var 容器頂部 = 滾動頂部 + clientBounds.height -
容器.clientHeight;
$("#liveMessengerContainer").CSS(
{頂部:containerTop +“px”,左側:containerLeft +“px”});
}