-
<linguagem script="javascript" type="texto/Javascript">
função getClientBounds()
{
var larguradocliente;
var clientHeight;
se ($.navegador.msie)
{
clienteWidth = document.body.clientWidth;
clientHeight = document.body.clientHeight;
}
senão se ($.browser.safari)
{
clienteLargura = janela.innerWidth;
clientHeight = janela.innerHeight;
}
senão se ($.browser.Opera)
{
clienteWidth = Math.min(window.innerWidth,
document.body.clientWidth);
clientHeight = Math.min(window.innerHeight,
document.body.clientHeight);
}
outro
{
clienteWidth = Math.min(window.innerWidth,
document.documentElement.clientWidth);
clientHeight = Math.min(window.innerHeight,
document.documentElement.clientHeight);
}
return {largura: larguradocliente, altura:alturadocliente};
}
função resetLiveMessengerPosition()
{
var clientBounds = getClientBounds();
var container = document.getElementById("liveMessengerContainer");
var scrollLeft = (document.documentElement.scrollLeft?
document.documentElement.scrollLeft: document.body.scrollLeft);
var scrollTop = (document.documentElement.scrollTop?
document.documentElement.scrollTop: document.body.scrollTop);
var containerLeft = scrollLeft + clientBounds.width -
container.clientWidth – 5;
var containerTop = scrollTop + clientBounds.height -
contêiner.clientHeight;
$("#liveMessengerContainer").CSS(
{topo: containerTop + "px", esquerda: containerLeft + "px"});
}