﻿function PanelLocationAdjustment(){
            var WWidth = document.body.clientWidth;
            var WHeight = document.body.clientHeight;
            var obj = document.getElementById('ctl00_MessageBoard');
            obj.style.display = Display;
            var objWidth = obj.offsetWidth;
            var objHeight = obj.offsetHeight;
            var Left, Top;
            if (WWidth > objWidth){
                Left = parseInt((WWidth - objWidth) / 2);
            }else{
                Left = parseInt((objWidth - WWidth) / 2);
            }
            if (WHeight > objHeight){
                Top = parseInt((WHeight - objHeight) / 2);
            }else{
                Top = parseInt((objHeight - WHeight) / 2);
            }
            obj.style.left = Left + "px";
            obj.style.top = Top + "px";
            //window.alert(Left + ":" + Top + ":" + WWidth + ":" + objWidth);
            window.onresize = function(){PanelLocationAdjustment()}
}
function RunMessage(){
    window.setTimeout("PanelLocationAdjustment()",100);
}
function CloseMessage(){
    var obj = document.getElementById('ctl00_MessageBoard');
    obj.style.display = "none";
}