function OpenLayer(LayerNam,TopMargin) {
	//ÆÄÀÌ¾î Æø½º¿¡¼­ ³ôÀÌ ¾ÈÀâÈ÷´Â ¹®Á¦ ¶§¹®¿¡ ÇÔ¼ö Ãß°¡..
	var TotHeight=getPageHeight();
	var LayerWidth = document.getElementById(LayerNam).style.width;
	//var LayerWidth = eval(LayerNam).style.width;
	LayerWidth = LayerWidth.replace('px','');
	document.getElementById(LayerNam).style.left=(document.body.scrollWidth-LayerWidth)/2+'px';
	//eval(LayerNam).style.left=(document.body.scrollWidth-LayerWidth)/2+'px';
	if(TopMargin=="") TopMargin=200;
	var tPos=parseInt(TopMargin)+parseInt(document.documentElement.scrollTop);
	document.getElementById(LayerNam).style.top=tPos/2+'px';	
	//eval(LayerNam).style.top=tPos/2+'px';	
	//document.all.WaitLayer.style.height=document.body.scrollHeight;
	//document.getElementById("WaitLayer").style.height=( document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight  ) + 'px';
	document.getElementById("WaitLayer").style.height=TotHeight + 'px';
	//alert(document.body.height+","+document.body.offsetHeight+","+document.body.scrollHeight+","+document.body.clientHeight+","+ document.documentElement.clientHeight );
	document.getElementById("WaitLayer").style.filter="alpha(opacity=16);"; //IE¿ë
	document.getElementById("WaitLayer").style.opacity=0.16; //±âÅ¸ ºñ IE¿ë
	document.getElementById("WaitLayer").style.display="block";
	document.getElementById(LayerNam).style.display="block";
	//eval(LayerNam).style.display="";
	
	MoreBright(LayerNam,60,tPos-8,tPos);	
}

function MoreBright(LayerNam,opacityValue,TopMargin,tPos){
	var oV = opacityValue;
	document.getElementById(LayerNam).style.filter="alpha(opacity="+ oV +");";	//IE¿ë
	document.getElementById(LayerNam).style.opacity=oV/100;						//±âÅ¸ ºñ IE¿ë
	document.getElementById(LayerNam).style.top=TopMargin+'px';
	if(oV >= 100) {
	    if(LayerNam=='LayerLogin2') {
	        if(document.frmLogin2.ID.value=="") {
	            document.frmLogin2.ID.focus();
	        }
	        else {
	            document.frmLogin2.PassWord.focus();
	        }
	    }
	    return;
	}
	oV = oV + 10;
	TopMargin=TopMargin+2;
	if(TopMargin>=tPos) TopMargin=tPos;
	setTimeout("MoreBright('"+LayerNam+"'," + oV + "," + TopMargin + "," + tPos + ")",10);
}

function CloseLayer(LayerNam) {
	document.getElementById("WaitLayer").style.display="none";
	LessBright(LayerNam,100);
}

function LessBright(LayerNam,opacityValue){
	var oV = opacityValue;
	document.getElementById(LayerNam).style.filter="alpha(opacity="+ oV +");";	//IE¿ë
	document.getElementById(LayerNam).style.opacity=oV/100;						//±âÅ¸ ºñ IE¿ë
	//document.getElementById(LayerNam).filters.alpha.opacity = oV;
	if(oV <= 0) {
		document.getElementById(LayerNam).style.display="none";
		//eval(LayerNam).style.display="none";
		return;
	}
	oV = oV - 20;
	setTimeout("LessBright('"+LayerNam+"'," + oV + ")",50);
}

function WaitGo() {
	var LayerWidth = 449;
	document.getElementById("WaitPop").style.left=(document.body.scrollWidth-LayerWidth)/2+'px';
	document.getElementById("WaitPop").style.top=document.documentElement.scrollTop+200+'px';

	document.getElementById("WaitLayer").style.height=( document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight  ) + 'px';
	//document.all.WaitLayer.style.height=( document.body.scrollHeight > document.body.clientHeight ? document.body.scrollHeight : document.body.clientHeight  ) + 'px';
	document.getElementById("WaitLayer").style.filter="alpha(opacity=16);"; //IE¿ë
	document.getElementById("WaitLayer").style.opacity=0.16; //±âÅ¸ ºñ IE¿ë
	document.getElementById("WaitLayer").style.display="";
	//document.all.WaitLayer.style.display="";
	document.getElementById("WaitPop").style.display="";
}

function WaitOut() {
	document.getElementById("WaitLayer").style.display="none";
    //document.all.WaitLayer.style.display="none";
	document.getElementById("WaitPop").style.display="none";
}

