var docEle = function() {
   return document.getElementById(arguments[0]) || false;
}
function OpenNewDiv(DivValue,DivWidth,DivHeight) {
   
	var DivID	= "NewDivID";
	var MaskID	= "NewMaskID";
	
	if (docEle(DivID)) document.removeChild(docEle(DivID));
	if (docEle(MaskID)) document.removeChild(docEle(MaskID));
	// 消息显示
	var NewDiv = document.createElement("div");
	NewDiv.id = MaskID;
	NewDiv.style.position = "absolute";
	NewDiv.style.zIndex = "999";
	//NewDiv.style.width = "600px";
	//NewDiv.style.height = "440px";
	var scrolltop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
	var _clientheight=0;

	_clientheight = Math.min(document.body.clientHeight , document.documentElement.clientHeight);
	if(_clientheight==0)
	_clientheight= Math.max(document.body.clientHeight , document.documentElement.clientHeight);
	var _clientwidth= document.documentElement.clientWidth || document.body.clientWidth;
	//整个页面的高度
	var _pageheight = Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);
	var msgtop = (scrolltop+(_clientheight-DivHeight)/2)+"px";
	var msgleft = (_clientwidth-DivWidth)/2+"px";
	
	NewDiv.style.top = msgtop;
	NewDiv.style.left =msgleft; // 屏幕居中
	NewDiv.style.background = "#EFEFEF";
	NewDiv.style.border = "1px solid #860001";
	NewDiv.style.padding = "3px";
	//NewDiv.innerHTML = "新激活图层内容";
	document.body.appendChild(NewDiv);
	
	// 锁屏图层
	var NewMask = document.createElement("div");
	NewMask.id = DivID;
	NewMask.style.position = "absolute";
	NewMask.style.zIndex = "998";
	NewMask.style.width = _clientwidth + "px";
	NewMask.style.height = _pageheight + "px";
	NewMask.style.top = "0px";
	NewMask.style.left = "0px";
	NewMask.style.background = "#666666";
	NewMask.style.filter ="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75";
	// NewMask.style.filter = "alpha(opacity=60)";
	NewMask.style.opacity = "0.40";
	document.body.appendChild(NewMask);
	
	// 关闭锁屏
	var newA = document.createElement("div");
	//newA.href = "#";
	newA.innerHTML = DivValue;
	newA.onclick = function() {
	document.body.removeChild(docEle(DivID));
	document.body.removeChild(docEle(MaskID));
	return false;
	}
	NewDiv.appendChild(newA);
}