-
<脚本语言=“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”});
}