<Script language = "javascript" type = "text/javascript">
Function $ ()
{
Return document. getElementById? Document. getElementById (arguments [0]): eval (arguments [0]);
}
Var Sys = {};
Var ua = navigator. userAgent. toLowerCase ();
If (window. ActiveXObject)
Sys. ie = ua. match (/msie ([\ d.] +)/) [1]
Else if (document. getBoxObjectFor)
Sys. firefox = ua. match (/firefox \/([\ d.] +)/) [1]
Else if (window. MessageEvent &&! Document. getBoxObjectFor)
Sys. chrome = ua. match (/chrome \/([\ d.] +)/) [1]
Else if (window. opera)
Sys. opera = ua. match (/opera. ([\ d.] +)/) [1]
Else if (window. openDatabase)
Sys. safari = ua. match (/version \/([\ d.] +)/) [1];
Function getClientBounds ()
{
Var clientWidth;
Var clientHeight;
If (Sys. ie)
{
ClientWidth = document. body. clientWidth;
ClientHeight = document. body. clientHeight;
}
Else if (Sys. safari)
{
Clientwidth = Window. innerwidth;
Clientheight = Window. innerheight;
}
Else if (SYS. Opera)
{
Clientwidth = math. Min (window. innerwidth, document. Body. clientwidth );
Clientheight = math. Min (window. innerheight, document. Body. clientheight );
}
Else
{
ClientWidth = Math. min (window. innerWidth, document.doc umentElement. clientWidth );
ClientHeight = Math. min (window. innerHeight, document.doc umentElement. clientHeight );
}
Return {width: clientWidth, height: clientHeight };
}
Function resetlivemessgerposition ()
{
Var clientBounds = getClientBounds ();
Var container = document. getElementById ("liveMessengerContainer ");
Var scrollLeft = (document.doc umentElement. scrollLeft?
Document.doc umentElement. scrollLeft: document. body. scrollLeft );
Var scrollTop = (document.doc umentElement. scrollTop?
Document.doc umentElement. scrollTop: document. body. scrollTop );
Var containerLeft = scrollLeft + clientBounds. width-container. clientWidth-5;
Var containerTop = scrollTop + clientBounds. height-container. clientHeight;
$ ("LiveMessengerContainer"). style. top = containerTop + "px ";
$ ("LiveMessengerContainer"). style. left = containerLeft + "px ";
}
Window. onscroll = function () {resetlivemessential gerposition ();};
Window. onresize = function () {resetlivemessential gerposition ();};
Window. onload = function () {resetLiveMessengerPosition ();};
</Script>