function popuplayer(t,s,w,h)
{
	if (!w) w = 600;
	if (!h) h = 400;
	if (!t) t = "POPUP WINDOWS";
	var pixelBorder = 3;
	var titleHeight = 15;
	w += pixelBorder * 2;
	h += pixelBorder * 2 + titleHeight;

	var bodyW = document.body.clientWidth;
	var bodyH = document.body.clientHeight;

	var posX = (bodyW - w) / 2;
	var posY = (bodyH - h) / 2;

	hiddenSelectBox('hidden');

	/*** ¹é±×¶ó¿îµå ·¹ÀÌ¾î ***/
	var obj = document.createElement("div");
	with (obj.style){
		position = "absolute";
		left = 0;
		top = 0;
		width = "100%";
		height = document.body.scrollHeight;
		backgroundColor = "#CCCCCC";
		filter = "Alpha(Opacity=70)";
		opacity = "0.5";
	}
	obj.id = "objPopupLayerBg";
	document.body.appendChild(obj);

	/*** ³»¿ëÇÁ·¹ÀÓ ·¹ÀÌ¾î ***/
	var obj = document.createElement("div");
	with (obj.style){
		position = "absolute";
		left = posX + document.body.scrollLeft;
		top = posY + document.body.scrollTop;
		width = w;
		height = h;
		backgroundColor = "#FFFFFF";
		border = "3px solid #000000";
	}
	obj.id = "objPopupLayer";
	document.body.appendChild(obj);

	/*** Å¸ÀÌÆ²¹Ù ·¹ÀÌ¾î ***/
	var top = document.createElement("div");
	with (top.style){
		position = "absolute";
		width = w - pixelBorder * 2;
		height = titleHeight;
		left = 0;
		top = 0;
		padding = "0px 0px 2px 0px";
		textAlign = "left";
		backgroundColor = "#000000";
		color = "#ffffff";
		font = "bold 11px tahoma";
	}
	top.innerHTML = "<table width='100%' cellspacing='0' cellpadding='0' style='table-layout:fixed;'><tr><td align='left' valign='top' style='padding-left:5px;' width='100%' nowrap><b style='color:#FFFFFF;font-family:Tahoma Dotum;font-size:11px;'>"+t+"<b></td><td align='right' style='padding-right:5px;cursor:hand;color:#FFFFFF;' title='Close' width='18' onclick='javascript:closeLayer()' onmouseover=\"this.style.backgroundColor='#aaaaaa';this.style.color='#000000';\"  onmouseout=\"this.style.backgroundColor='#000000';this.style.color='#FFFFFF';\" nowrap><b style='font-family:Tahoma;font-size:10px;'>X</b></td></tr></table>";
	obj.appendChild(top);

/*
	var bottom = document.createElement("div");
	with (bottom.style){
		position = "absolute";
		width = w - pixelBorder * 2;
		height = titleHeight;
		left = 0;
		top = h - titleHeight - pixelBorder * 3;
		padding = "2px 0px 0px 0px";
		textAlign = "right";
		backgroundColor = "#333333";
		color = "#ffffff";
		font = "bold 11px tahoma";
	}
	bottom.innerHTML = "<a href='javascript:closeLayer()' style='color:#ffffff;'>close</a>&nbsp;&nbsp;&nbsp;";
	obj.appendChild(bottom);
/*
	/*** ¾ÆÀÌÇÁ·¹ÀÓ ***/
	var ifrm = document.createElement("iframe");
	with (ifrm.style){
		width = w - 6;
		height = h;
		backgroundColor = "#FFFFFF";
		paddingTop = titleHeight;
	}
	ifrm.frameBorder = 0;
	ifrm.src = s;
	obj.appendChild(ifrm);
}

function hiddenSelectBox(mode)
{
	var obj = document.getElementsByTagName('select');
	for (i=0;i<obj.length;i++){
		obj[i].style.visibility = mode;
	}
}

function closeLayer()
{
	hiddenSelectBox('visible');
	getID('objPopupLayer').parentNode.removeChild( getID('objPopupLayer') );
	getID('objPopupLayerBg').parentNode.removeChild( getID('objPopupLayerBg') );
}
function getID(obj){return document.getElementById(obj)}