-
<skrip bahasa="javascript" type="teks/Javascript">
fungsi getClientBounds()
{
var lebar klien;
var klienTinggi;
jika ($.browser.msie)
{
clientWidth = dokumen.body.clientWidth;
clientHeight = dokumen.body.clientHeight;
}
else if ($.browser.safari)
{
clientWidth = jendela.InnerWidth;
clientHeight = jendela.innerHeight;
}
lain jika ($.browser.Opera)
{
clientWidth = Math.min(window.innerWidth,
dokumen.body.clientWidth);
clientHeight = Math.min(window.innerHeight,
dokumen.body.clientHeight);
}
kalau tidak
{
clientWidth = Math.min(window.innerWidth,
dokumen.documentElement.clientWidth);
clientHeight = Math.min(window.innerHeight,
dokumen.documentElement.clientHeight);
}
return { lebar : lebar klien, tinggi : tinggi klien };
}
fungsi 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 : dokumen.body.scrollTop);
var containerLeft = scrollLeft + clientBounds.width -
container.clientWidth – 5;
var containerTop = scrollTop + clientBounds.height -
container.clientHeight;
$("#liveMessengerContainer").CSS(
{atas : containerTop + "px", kiri : containerLeft + "px"});
}