var marklayer = {
// 打开遮罩层
open: function(showlayerId) {
var mark = document.createElement("div");
mark.id = "mark";
mark.style.position = "absolute";
mark.style.left = "0px";
mark.style.top = "0px";
mark.style.width = "100%";
mark.style.height = ((document.documentElement.clientHeight > document.documentElement.scrollHeight) ? document.documentElement.clientHeight : document.documentElement.scrollHeight) + "px";
mark.style.background = "#000";
mark.style.filter = "Alpha(opacity=10)";
mark.style.opacity = "0.3";
mark.style.zIndex = "10000";
document.body.appendChild(mark);
var show = document.getElementById(showlayerId);
var sTop = parseInt(show.style.height) ? (document.documentElement.clientHeight - parseInt(show.style.height)) / 2 + "px" : "20%";
var sLeft = parseInt(show.style.width) ? (document.documentElement.clientWidth - parseInt(show.style.width)) / 2 + "px" : "20%";
show.style.display = "block";
show.style.align = "center";
show.style.position = "absolute";
show.style.zIndex = "10001";
show.style.top = sTop;
show.style.left = sLeft;
},
// 关闭遮罩层
close: function(showlayerId) {
var mark = document.getElementById("mark");
document.body.removeChild(mark);
document.getElementById(showlayerId).style.display = "none";
}
}