var ShowMsg = {
	flag:false,
	shield:null,
	alertFram:null,
	opacity:0,
	interval:null,
	Show:function(strTxt,boolCustom){
		boolCustom=boolCustom?true:false;
		if (ShowMsg.flag)
		{
			strTxt=strTxt.toString().replace(/\\/gi,"\\\\");
			strTxt=strTxt.replace(/"/gi,"\\\"");
			strTxt=strTxt.replace(/'/gi,"\\\'");
			strTxt=strTxt.replace(/\n/,"\\n");
			setTimeout("ShowMsg.Show(\""+strTxt+"\","+boolCustom+");",500);
			return;
		}
		else
		{
			ShowMsg.flag=true;
		}
		ShowMsg.shield = document.createElement("DIV");
		ShowMsg.shield.className="layer";

		ShowMsg.alertFram = document.createElement("DIV");
		ShowMsg.alertFram.className="fram";
		if (boolCustom)
		{
			strHtml=strTxt;
		}
		else
		{
			strHtml  = "<form name='' method='post' action='' runat='server'>\n";
			strHtml  = "<ul class='win_li'>\n";
			strHtml += "	<li class='sub'><span class='right orange' onclick='ShowMsg.doOk()'>关闭</span>用户登录</li>\n";
			strHtml += "	<li class='lists'>用户名：<input type='text' size='15' name='userName'></li>\n";
			strHtml += "	<li>密&nbsp;&nbsp;&nbsp;码：<input type='password' size='15' name='passWord'></li>\n";
			strHtml += "	<li><input type=\"submit\" value=\" 登录 \" onclick=\"ShowMsg.doOk()\" /> <a href='/MyOffice/register.asp' target='_blank' class='orange'>注册</a> <a href='/MyOffice/GetPassword.asp' target='_blank' class='blue'>忘记密码</a></li>\n";
			strHtml += "</ul>\n";
			strHtml += "</form>\n";
		}
		ShowMsg.alertFram.innerHTML = strHtml;
		document.body.appendChild(ShowMsg.alertFram);
		document.body.appendChild(ShowMsg.shield);
		ShowMsg.opacity = 0;
		ShowMsg.interval = setInterval("ShowMsg.doAlpha()",20);
		ungun();
	},
	doAlpha:function(){
		if (!ShowMsg.flag)
		{
			return;
		}
		if (ShowMsg.opacity>30)
		{
			clearInterval(ShowMsg.interval);
			return;
		}
		ShowMsg.shield.style.filter = "alpha(opacity="+ShowMsg.opacity+");";
		ShowMsg.shield.style.opacity=ShowMsg.opacity/100;
		ShowMsg.opacity+=3;
		
	},
	doOk:function(){
		if (!ShowMsg.flag)
		{
			return;
		}
		ShowMsg.alertFram.parentNode.removeChild(ShowMsg.alertFram);
		ShowMsg.shield.parentNode.removeChild(ShowMsg.shield);
		ShowMsg.alertFram=null;
		ShowMsg.shield=null;
		ShowMsg.opacity=0;
		ShowMsg.interval=null;
		ShowMsg.flag=false;
		gun()
	}
}

function ungun(){
	document.onmousewheel=function()
	{
	window.event.keyCode=35;
	event.returnValue=false;
	document.body.scroll="no";
	}
}

function gun(){
	document.onmousewheel=function()
	{
	window.event.keyCode=35;
	event.returnValue=true;
	}
}