document.write('<div id="popLayer" style="position: absolute; z-index: 2000; background-color: #DDEAF8; border-left: 1px #BCD5F1 solid; border-right: 2px #8AA3BF solid; border-top: 1px #BCD5F1 solid; border-bottom: 2px #8AA3BF solid; padding: 5px; visibility: hidden;"></div>');
document.write('<div id="MaskLayer" style="position: absolute; z-index: 1999; left: 0; top: 0; background-color: #AABBCC; visibility: hidden; filter: alpha(opacity=85); -moz-opacity: .85; opacity: .85;"></div>');

function ShowPop(ltitle,url,lwidth,lheight,bigmode) {
	if (bigmode==true) {
		with (document.getElementById("MaskLayer")) {
			style.width=document.documentElement.scrollWidth;
			style.height=document.documentElement.scrollHeight;
			style.visibility='visible';
		}
	}
	with (document.getElementById("popLayer")) {
		if (bigmode==true) {
			style.left=(document.documentElement.clientWidth-lwidth)/2+document.documentElement.scrollLeft;
			style.top=(document.documentElement.clientHeight-lheight)/2+document.documentElement.scrollTop;
		}else{
			if (window.event.clientX+lwidth>document.documentElement.clientWidth) {
				style.left=window.event.clientX-lwidth;
			}else{
				style.left=window.event.clientX;
			}
			style.top=window.event.clientY+document.documentElement.scrollTop;
		}
		style.width=lwidth;
		style.height=lheight;
		innerHTML='<div align="left" style="float: left; font-weight: bold; color: #062971;">'+ltitle+'</div><div align="right" style="float: right;"><img src="dpimages/admin/closepop.gif" border="0" style="cursor: hand;" onclick="HidePop();" /></div><hr style="color:#BCD5F1" size="2" /><div align="center"><iframe id="popLayerFrame" width="'+(lwidth-10)+'" height="'+(lheight-20)+'" src="'+url+'" frameborder="0"></iframe></div>';
		style.visibility='visible';
	}
}

function HidePop() {
	document.getElementById("popLayer").style.visibility='hidden';
	document.getElementById("popLayerFrame").style.display='none';
	document.getElementById("MaskLayer").style.visibility='hidden';
}

function HideParentPop() {
	parent.document.getElementById("popLayer").style.visibility='hidden';
	parent.document.getElementById("popLayerFrame").style.display='none';
	parent.document.getElementById("MaskLayer").style.visibility='hidden';
}