﻿// JScript 文件

	var docEle = function() {
		return document.getElementById(arguments[0]) || false;
	}
	function openNewDiv(_id) {
		var m = "mask";
		if (docEle(_id)) document.removeChild(docEle(_id));
		if (docEle(m)) document.removeChild(docEle(m));
		var newDiv = document.createElement("div");
		newDiv.id = _id;
		newDiv.style.position = "absolute";
		newDiv.style.zIndex = "9999";
		newDiv.style.width = "515px";
		newDiv.style.height = "500px";
		newDiv.style.top = "550px";
		newDiv.style.left =(parseInt(window.screen.width)-450) / 2 + "px";
		newDiv.style.background = "#EFEFEF";
		newDiv.style.border = "1px solid #860001";
		newDiv.style.padding = "5px";
		newDiv.innerHTML = "<iframe  src='Ask.aspx?ID="+_id+"'frameborder='0'"+
		" width='515' height='500'></iframe>";
		document.body.appendChild(newDiv);
		var newMask = document.createElement("div");
		newMask.id = m;
		newMask.style.position = "absolute";
		newMask.style.zIndex = "1";
		newMask.style.width = document.body.scrollWidth + "px";
		newMask.style.height = document.body.scrollHeight + "px";
		newMask.style.top = "0px";
		newMask.style.left = "0px";
		newMask.style.background = "#000";
		newMask.style.filter = "alpha(opacity=40)";
		newMask.style.opacity = "0.40";
		document.body.appendChild(newMask);
		var newA = document.createElement("a");
		newA.href = "#";
		newA.innerHTML = "<div align='center'><font style='color:#000000;font-size:12px;TEXT-DECORATION:none;'><br/>关闭激活层</font></div>";
		newA.onclick = function() {
			document.body.removeChild(docEle(_id));
			document.body.removeChild(docEle(m));
			return false;
		}
		newDiv.appendChild(newA);
	}

