﻿function LoadingBegin()
{
    document.getElementById("DivLoad").style.display='';
	var obj = document.getElementById("TableMain");
    var wh = obj.offsetWidth;
    var hh = obj.offsetHeight;
    var h = document.documentElement.scrollTop;
    document.getElementById("DivBack").style.height = document.body.clientHeight;
    obj.style.zIndex="9999";
    obj.style.left=(document.documentElement.clientWidth-wh)/2+"px";
    obj.style.top=(document.documentElement.clientHeight-hh)/2+ h +"px";    
}
function LoadingEnd()
{
    document.getElementById("DivLoad").style.display='none';
}
function GetHtml(msgText)
{
    var Html = '<div id="DivLoad" style="display:none;">\
                <div id="ShowDiv" style="width:100%;height:100%; position:absolute;left:0px;top:0px; z-index:9998;text-align:center" >\
                    <div id="TableMain" style="background-color:#f0f0f0;border:3px #666 solid;padding:5px ;position:absolute;padding:0;margin:0 auto;">\
				<table><tbody><tr><td><img style="height:32px;width:32px;" src="/Scripts/Images/loading.gif"></img></td><td id="LoadingText">&nbsp;&nbsp;' + msgText + '&nbsp;&nbsp;</td></tr></tbody></table>\
	                  </div>\
	                 <div id="DivBack" style="width:100%;height:'+window.screen.availHeight+'px;background:#fff; position:absolute;left:0px;top:0px;z-index:9997;filter:alpha(opacity=40);-moz-opacity:0.4;opacity: 0.4;filter:alpha(opacity=40);-moz-opacity:0.4;"></div>\
                </div>\
            </div>';
    return Html;
}
function LoadingSetHtml(msgText) {
    document.getElementById("LoadingText").innerHTML = msgText;
}
function LoadingGetHtml(msgText)
{
    document.write(GetHtml(msgText));
}


