//navigator.preference(network.cookie.cookieBehavior, 0);
//alert(navigator.cookieEnable);

//if (navigator.cookieEnabled){
//	alert("ÄíÅ° Çã¿ë!");
//}else{
//	alert("ÄíÅ° Çã¿ë X");
//}

function OpenLayer(LayerNam,TopMargin) {
	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.filter="alpha(opacity=16);"; //IE¿ë
	document.getElementById("WaitLayer").style.opacity=0.16; //±âÅ¸ ºñ IE¿ë
	document.getElementById("WaitLayer").style.display="";
	document.getElementById(LayerNam).style.display="";
	//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 = 442;
	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";
}

function loginenter(event) {
	var KeyValue = (window.netscape) ? event.which : event.keyCode;
	if (KeyValue == 13 ) {
		LoginGo();
	}
}

function BigImgView(G_Cod) {
	window.open('/popup/Popup_BigImg.asp?G_Cod=' + G_Cod,'È®´ëÀÌ¹ÌÁö','width=475, height=600,top=0,left=0, resize=yes'); 
}

//Âò
function ZZim(G_Cod,cType) {
	iProc.location.href="/Detail/ZZim.asp?G_Cod="+G_Cod+"&cType="+cType;
}
	
//¹è³Ê ·Î±×
function LogBanner(SessionID, BanCod){
	iProc.location.href="/Public/LogBanner.asp?SessionID="+SessionID+"&BanCod="+BanCod;
}

function LogIn(){
	if(document.frmLogin2){
		OpenLayer('LayerLogin2',50);
		if(document.frmLogin2.ID.value==''){
			document.frmLogin2.ID.focus();
		}else{
			document.frmLogin2.PassWord.focus();
		}
	}else{
		alert("ÆäÀÌÁö ·ÎµùÁßÀÔ´Ï´Ù.\nÀá½ÃÈÄ ´Ù½Ã ½ÃµµÇØÁÖ¼¼¿ä.");
		return;
	}
}

function ChgCateAll(Num){
	for (i=1;i<10 ;i++ ){
		document.getElementById("CateAllMain"+i).className="";
		document.getElementById("CateAllSub"+i).style.display="none";
	}
	document.getElementById("CateAllMain"+Num).className="now";
	document.getElementById('CateAllSub'+Num).style.display="block";
}

	//¸ÞÀÎGSÀÎÁõ »ó¼¼ ÆË¾÷
	function GSOpen() {
			window.open('/popup/popup_GS_info.html','','width=444px;,height=410px;top=0,left=0;scrollbars=no;');
	}