var loginStatus = "";

function OpenWindow(theURL,winName, sbars, stat, mtop, mleft, wsize, hsize) 
{
	window.open(theURL,winName,"scrollbars="+sbars+", status="+stat+",top="+mtop+",left="+mleft+",width="+wsize+",height="+hsize+"");
}

// ·¹ÀÌ¾î ÆË¾÷ Close
function fnLayerPopClose(callfunc)
{
	parent.document.all.backDiv.style.display = 'none';
	parent.document.all.layerDiv.style.display = 'none';
	parent.document.all.layerPop.style.display = 'none';
	parent.layerPop.location.href = "about:blank";
	
	if(callfunc != "" && callfunc != "undefined")
		parent.document.Main.SetVariable('callfunc', callfunc);
}

// ·¹ÀÌ¾î ÆË¾÷ Close
function fnLayerPopClose2()
{
	parent.document.all.backDiv2.style.display = 'none';
	parent.document.all.layerDiv2.style.display = 'none';
	parent.document.all.layerPop2.style.display = 'none';
	parent.layerPop2.location.href = "about:blank";
}

// ¸ðµç ·¹ÀÌ¾î ÆË¾÷ Close
function fnLayerAllClose()
{
	document.all.backDiv.style.display = 'none';
	document.all.layerDiv.style.display = 'none';
	document.all.layerPop.style.display = 'none';
	document.all.backDiv2.style.display = 'none';
	document.all.layerDiv2.style.display = 'none';
	document.all.layerPop2.style.display = 'none';
	document.all.quickLayer.style.display = 'none';
	layerPop.location.href = "about:blank";
	layerPop2.location.href = "about:blank";
}

// ·Î±×ÀÎ ÆË¾÷
function fnLoginPop(kind, param)
{	
    var sUrl = "/2008_mb/member/login.asp";
    
    if(param != undefined && param != null && param != "")
    	sUrl += "?" + param;
    
    var nwidth = 390;
    var nheight = 292;
    
	var LeftPosition;
	var TopPosition;
	
	var backObj;
	var layerObj;
	var layerFrmObj;
	var layerFrm;
	
	// ÆË¾÷ 
	if(kind == "pop" || kind == "script")
	{
		LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
		TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) + 80 : 0;

		backObj = document.all.backDiv;
		layerObj = document.all.layerDiv;
		layerFrmObj = document.all.layerPop;
		layerFrm = layerPop;
	}
	else if(kind == "popmove")
	{
		LeftPosition = (parent.document.body.clientWidth) ? (parent.document.body.clientWidth-nwidth)/2 : 0;
		TopPosition = (parent.document.body.clientHeight) ? ((parent.document.body.clientHeight-nheight)/2) + 80 : 0;

		backObj = parent.document.all.backDiv;
		layerObj = parent.document.all.layerDiv;
		layerFrmObj = parent.document.all.layerPop;
		layerFrm = parent.layerPop;
		
	}
	else if(kind == "pop2" || kind == "pop2script")
	{
		LeftPosition = (parent.document.body.clientWidth) ? (parent.document.body.clientWidth-nwidth)/2 : 0;
		TopPosition = (parent.document.body.clientHeight) ? ((parent.document.body.clientHeight-nheight)/2) + 80 : 0;

		backObj = parent.document.all.backDiv2;
		layerObj = parent.document.all.layerDiv2;
		layerFrmObj = parent.document.all.layerPop2;
		layerFrm = parent.layerPop2;
	}

		//backObj.style.display = "";
		layerObj.style.display = "";
		
		layerObj.style.width = nwidth;
		layerObj.style.height = nheight;
		layerObj.style.top = TopPosition-100;
		layerObj.style.left = LeftPosition;
		
		layerFrmObj.style.display = "";
		layerFrmObj.style.width = nwidth;
		layerFrmObj.style.height = nheight;
		layerFrm.location.href = sUrl;
}

// ·Î±×¾Æ¿ô
function fnLogout()
{
	subFrame.location.href = "/2008_mb/member/logout.asp";
}

// ¾Æ¾Æµð/ºñ¹ø Ã£±â ÀÌµ¿
function fnSearchIdPwd()
{
	fnLayerPopClose();
	parent.fnSearchIdPwdPop();
}

// ¿ìÆí¹øÈ£°Ë»ö ÆË¾÷
function fnZipcodePop(wform,zipcode1,zipcode2,address1,address2)
{
    var sUrl = "/2008_mb/pop/pop_address.asp?wform="+wform+"&zipcode1="+zipcode1+"&zipcode2="+zipcode2+"&address1="+address1+"&address2="+address2;
    
    var nwidth = 390;
    var nheight = 220;
    
	var LeftPosition = (parent.document.body.clientWidth) ? (parent.document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (parent.document.body.clientHeight) ? ((parent.document.body.clientHeight-nheight)/2) + 60 : 0;
	
	parent.document.all.layerDiv2.style.display = "";
	
	parent.document.all.layerDiv2.style.width = nwidth;
	parent.document.all.layerDiv2.style.height = nheight;
	parent.document.all.layerDiv2.style.top = TopPosition-100;
	parent.document.all.layerDiv2.style.left = LeftPosition;
	
	parent.document.all.layerPop2.style.display = "";
	parent.document.all.layerPop2.style.width = nwidth;
	parent.document.all.layerPop2.style.height = nheight;
	parent.layerPop2.location.href = sUrl;
}

// ¾ÆÀÌµð Áßº¹È®ÀÎ
function fnIdDupCheck(id)
{
    var sUrl = "/2008_mb/pop/pop_id_dupcheck.asp?me_id="+id;
    
    var nwidth = 390;
    var nheight = 292;
    
	var LeftPosition = (parent.document.body.clientWidth) ? (parent.document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (parent.document.body.clientHeight) ? ((parent.document.body.clientHeight-nheight)/2) + 60 : 0;
	
	//document.all.backDiv.style.display = "";
	parent.document.all.layerDiv2.style.display = "";
	
	parent.document.all.layerDiv2.style.width = nwidth;
	parent.document.all.layerDiv2.style.height = nheight;
	parent.document.all.layerDiv2.style.top = TopPosition-100;
	parent.document.all.layerDiv2.style.left = LeftPosition;
	
	parent.document.all.layerPop2.style.display = "";
	parent.document.all.layerPop2.style.width = nwidth;
	parent.document.all.layerPop2.style.height = nheight;
	parent.layerPop2.location.href = sUrl;
}

// ¾ÆÀÌµð/ºñ¹Ð¹øÈ£ Ã£±â ÆË¾÷
function fnSearchIdPwdPop()
{
	fnLayerAllClose();
	
    var sUrl = "/2008_mb/member/search_idpass.asp";
    
    var nwidth = 780;
    var nheight = 413;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;
	
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// È¸¿ø°¡ÀÔ ·¹ÀÌ¾î ÆË¾÷
function fnMemberJoinPop()
{
	fnLayerAllClose();
	
    var sUrl = "/2008_mb/member/member_auth.asp";
    
    var nwidth = 780;
    var nheight = 413;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;
		
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}


// È¸¿øÅëÇÕ ·¹ÀÌ¾î ÆË¾÷
function fnMemberMigratePop(me_id)
{
	fnLayerAllClose();
	
    var sUrl = "/2008_mb/member/member_migrate.asp?me_id="+me_id;
    
    var nwidth = 780;
    var nheight = 413;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;
		
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// È¸¿øÁ¤º¸ ¼öÁ¤ ·¹ÀÌ¾î ÆË¾÷
function fnMemberModifyPop()
{
	fnLayerAllClose();
	
    var sUrl = "/2008_mb/mypage/member_modify.asp";
    
    var nwidth = 780;
    var nheight = 413;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;


	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// È¸¿øÅ»Åð ·¹ÀÌ¾î ÆË¾÷
function fnMemberOutPop()
{
	fnLayerAllClose();
	
    var sUrl = "/2008_mb/mypage/member_out.asp";
    
    var nwidth = 780;
    var nheight = 413;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;

	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// °í°´¼¾ÅÍ ·¹ÀÌ¾î ÆË¾÷
function fnMembershipPop()
{
	fnLayerAllClose();
	
    var sUrl = "/2008_mb/help/membership.asp";
    
    var nwidth = 780;
    var nheight = 413;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;
	
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// ¸ÅÀåÃ£±â ·¹ÀÌ¾î ÆË¾÷
function fnStorePop()
{
	fnLayerAllClose();
	
    var sUrl = "/2008_mb/store/store.asp";
    
    var nwidth = 780;
    var nheight = 413;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;

	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// ¸ÅÀå ¾àµµ ÆË¾÷
function fnStoreMapPop(seq)
{
    var sUrl = "/2008_mb/pop/pop_store.asp?seq="+seq;
    
    var nwidth = 700;
    var nheight = 400;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? (document.body.clientHeight-nheight)/2 : 0;
		
	document.all.layerDiv2.style.display = "";
	
	document.all.layerDiv2.style.width = nwidth;
	document.all.layerDiv2.style.height = nheight;
	document.all.layerDiv2.style.top = TopPosition;
	document.all.layerDiv2.style.left = LeftPosition;
	
	document.all.layerPop2.style.display = "";
	document.all.layerPop2.style.width = nwidth;
	document.all.layerPop2.style.height = nheight;
	layerPop2.location.href = sUrl;
}

// ¸ÅÀå°³¼³¹®ÀÇ ·¹ÀÌ¾î ÆË¾÷
function fnStoreSrchPop()
{
	fnLayerAllClose();
	
    var sUrl = "/2008_mb/store/store_open.asp";
    
    var nwidth = 780;
    var nheight = 413;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;

		
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// °³ÀÎÁ¤º¸º¸È£Á¤Ã¥ ·¹ÀÌ¾î ÆË¾÷
function fnPrivacyPop()
{
	fnLayerAllClose();
	
    var sUrl = "/2008_mb/help/privacy_policy.asp";
    
    var nwidth = 780;
    var nheight = 413;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;

	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// ÀÌº¥Æ®1 ÀüÃ¼ ¸ñ·Ï
function fnEvent1ListPop()
{
    var sUrl = "/2008_mb/event/worcation/event1_totlist.asp";
    
    var nwidth = 570;
    var nheight = 467;
    
	var LeftPosition;
	var TopPosition;
	
	LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;
		
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;	
}

// ÀÌº¥Æ®1 µî·Ï
function fnEvent1Reg(content)
{
	var toDay = new Date();
	var year = toDay.getYear();
	var month = toDay.getMonth()+1;
	var day = toDay.getDate();

	// 6¿ù 29ÀÏ±îÁö ÀÌº¥Æ®°¡´É
	if(year <= 2008 && month <= 6 && day < 30)
	{
		if(content == null || content.trim() == "")
		{
			alert("worcation Á¤ÀÇ¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
			return;
		}
		if(GetLenByByte(content) > 300)
		{
			alert("worcation Á¤ÀÇ´Â ÇÑ±Û 150ÀÚ, ¿µ¹® 300ÀÚ ÀÌ³»·Î ÀÔ·ÂÇØÁÖ¼¼¿ä.");
			return;
		}
		if(!confirm("ÀÔ·ÂÇÏ½Å Á¤ÀÇ¸¦ Á¦ÃâÇÏ½Ã°Ú½À´Ï±î?"))
			return;
    	
    	var Form = document.mainForm;
    	Form.et_content.value = content;		
		
		// ½Å»óÁ¤º¸ ÀÔ·ÂÆû Popup
    	var sUrl = "/2008_mb/event/worcation/event_memform.asp?eventno=1";
    	
    	var nwidth = 519;
    	var nheight = 375;

		var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
		var TopPosition = (document.body.clientHeight) ? (document.body.clientHeight-nheight)/2 : 0;
		
		document.all.layerDiv.style.display = "";
		
		document.all.layerDiv.style.width = nwidth;
		document.all.layerDiv.style.height = nheight;
		document.all.layerDiv.style.top = TopPosition;
		document.all.layerDiv.style.left = LeftPosition;
		
		document.all.layerPop.style.display = "";
		document.all.layerPop.style.width = nwidth;
		document.all.layerPop.style.height = nheight;
		layerPop.location.href = sUrl;
	}
	else
	{
		alert("ÀÌº¥Æ®°¡ ¸¶°¨µÇ¾ú½À´Ï´Ù.");
		return;
	}
}

// ÀÌº¥Æ®1 ¸¶°¨
function fnEvent1End()
{
    var sUrl = "/2008_mb/event/event1_end.asp";
    
    var nwidth = 420;
    var nheight = 218;
    
	var LeftPosition;
	var TopPosition;
	
	LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;
		
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;	
}

// ÀÌº¥Æ®2 ¸¶°¨
function fnEvent2End()
{
    var sUrl = "/2008_mb/event/event2_end.asp";
    
    var nwidth = 420;
    var nheight = 218;
    
	var LeftPosition;
	var TopPosition;
	
	LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;
		
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;	
}

// ÀÌº¥Æ® °øÁö
function fnEventDelay()
{
    var sUrl = "/2008_mb/event/worcation/event0526.asp";
    
    var nwidth = 390;
    var nheight = 203;
    
	var LeftPosition;
	var TopPosition;
	
	LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	TopPosition = (document.body.clientHeight) ? (document.body.clientHeight-nheight)/2 : 0;
		
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;	
}

// ÀÌº¥Æ®2 Âü¿©ÇÏ±â
function fnEvent2RegPop(type)
{
	var toDay = new Date();
	var year = toDay.getYear();
	var month = toDay.getMonth()+1;
	var day = toDay.getDate();

	// 6¿ù 29ÀÏ±îÁö ÀÌº¥Æ®°¡´É
	if(year <= 2008 && month <= 6 && day < 30)
	{
		// ½Å»óÁ¤º¸ ÀÔ·ÂÆû Popup
    	var sUrl = "/2008_mb/event/worcation/event_memform.asp?eventno=2";
    	
    	var nwidth = 519;
    	var nheight = 375;

		var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
		var TopPosition = (document.body.clientHeight) ? (document.body.clientHeight-nheight)/2 : 0;
		
		document.all.layerDiv.style.display = "";
		
		document.all.layerDiv.style.width = nwidth;
		document.all.layerDiv.style.height = nheight;
		document.all.layerDiv.style.top = TopPosition;
		document.all.layerDiv.style.left = LeftPosition;
		
		document.all.layerPop.style.display = "";
		document.all.layerPop.style.width = nwidth;
		document.all.layerPop.style.height = nheight;
		layerPop.location.href = sUrl;
	}
	else
	{
		alert("ÀÌº¥Æ®°¡ ¸¶°¨µÇ¾ú½À´Ï´Ù.");
		return;
	}
}

// ÀÌº¥Æ®2 »ó¼¼º¸±â
function fnEvent2ViewPop(seq)
{
    var sUrl = "/2008_mb/event/worcation/event2_view.asp?seq=" + seq;
    
    var nwidth = 519;
    var nheight = 467;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? (document.body.clientHeight-nheight)/2 : 0;
	
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// Áö³­ ÀÌº¥Æ® ¸ñ·Ï
function fnEventList()
{
	layerPop.location.href = "about:blank";
	
    var sUrl = "/2008_mb/event/event_list.asp";
    
    var nwidth = 526;
    var nheight = 474;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? (document.body.clientHeight-nheight)/2 : 0;
	
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// Worcation People °ø°¨´ñ±Û ¸ñ·Ï
function fnWorcCommentPop(seq)
{
    var sUrl = "/2008_mb/story/worcation_comment.asp?seq=" + seq;
    
    var nwidth = 519;
    var nheight = 500;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) + 60 : 0;
	
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition-100;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// Worcation People ¸ÞÀÏº¸³»±â
function fnWorcSendMailPop(seq)
{
    var sUrl = "/2008_mb/story/worcation_email.asp?seq=" + seq;
    
    var nwidth = 519;
    var nheight = 486;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) + 60 : 0;
	
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition-100;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// Worcation ½ºÅ©·¦ ÆË¾÷
function fnWorcScrapPop(seq)
{
    var sUrl = "/2008_mb/story/worcation_scrap.asp?seq=" + seq;
    
    var nwidth = 389;
    var nheight = 292;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) + 60 : 0;
	
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition-100;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// Worcation ½ºÅ©·¦History ÆË¾÷
function fnWorcScrapHistoryPop(seq)
{
    var sUrl = "/2008_mb/story/worcation_scraphist.asp?seq=" + seq;
    
    var nwidth = 519;
    var nheight = 468;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) + 60 : 0;
	
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition-100;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// Worcation People ÃßÃµ
function fnWorcRecommend(seq)
{
	subFrame.location.href = "/2008_mb/story/worcation_proc.asp?proc_type=RECM&seq="+seq;
}

// Worcation People Á¶È¸¼ö Áõ°¡
function fnWorcViewUpdate(seq)
{
	subFrame.location.href = "/2008_mb/story/worcation_proc.asp?proc_type=HIT&seq="+seq;
}

// ÆÄÀÏ ´Ù¿î·Îµå
function fnDownload(fileName)
{
	//subFrame.location.href = "/2008_mb/common/fileDownload.asp?filename="+fileName;
	
    var sUrl = "/2008_mb/pop/download.asp?filename="+fileName;
    
    var nwidth = 390;
    var nheight = 183;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2+60 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) + 60 : 0;

	window.open(sUrl, "download", "scrollbars=no, status=no,top="+TopPosition+",left="+LeftPosition+",width="+nwidth+",height="+nheight+"");
}

// AD Story ÆÛ°¡±â
function fnAdStoryCopy(fileName)
{
	var str = "";
	
	str = "<embed src='"+fileName+"' autostart='true' loop='1' volume='60%' type='video/x-ms-asf'></embed>";
	str += "</embed>";
			
    window.clipboardData.setData('Text', str);
    alert('        Å¬¸³º¸µå¿¡ º¹»çµÇ¾ú½À´Ï´Ù.\n\nCTRL + V·Î ¿øÇÏ´Â °÷¿¡ ºÙ¿©³Ö±â ÇÏ¼¼¿ä.');
}

// ´º½º »ó¼¼º¸±â
function fnNewsView(seq, schItem, schText)
{
    var sUrl = "/2008_mb/mind/notice_detail.asp?seq=" + seq;
    
    if(schItem!="" && schText!="")
		sUrl += "&sf=" + schItem + "&ss=" + schText;
    
    var nwidth = 900;
    var nheight = 355;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;
	
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// º¸µµÀÚ·á »ó¼¼º¸±â
function fnInfoView(seq, schItem, schText)
{
    var sUrl = "/2008_mb/mind/info_detail.asp?seq=" + seq;
    
    if(schItem!="" && schText!="")
		sUrl += "&sf=" + schItem + "&ss=" + schText;
    
    var nwidth = 900;
    var nheight = 355;
    
	var LeftPosition = (document.body.clientWidth) ? (document.body.clientWidth-nwidth)/2 : 0;
	var TopPosition = (document.body.clientHeight) ? ((document.body.clientHeight-nheight)/2) : 0;
	
	//document.all.backDiv.style.display = "";
	document.all.layerDiv.style.display = "";
	
	document.all.layerDiv.style.width = nwidth;
	document.all.layerDiv.style.height = nheight;
	document.all.layerDiv.style.top = TopPosition;
	document.all.layerDiv.style.left = LeftPosition;
	
	document.all.layerPop.style.display = "";
	document.all.layerPop.style.width = nwidth;
	document.all.layerPop.style.height = nheight;
	layerPop.location.href = sUrl;
}

// Event1
function goFlashEvent1()
{
	parent.fnLayerAllClose();
	parent.document.Main.SetVariable('callfunc', 'event1');
}

// Event2
function goFlashEvent2()
{
	parent.fnLayerAllClose();
	parent.document.Main.SetVariable('callfunc', 'event2');
}

// Worcation ÀÌ¶õ?
function goFlashWorcation()
{
	parent.fnLayerAllClose();
	parent.document.Main.SetVariable('callfunc', 'event0');
}


function go_link(val1, val2){
		switch(val1)
		{
			case 0 :
				location.href = '/2008_mb/default.asp'; // ¸ÞÀÎ
				break;
			// mindbridge
			case 1 :
				switch(val2)
				{
					case 0 : 
					case 1 : 
					case 2 : 
					case 3 : 
					case 4 : 
				}			
				break;

			// worcation story
			case 2 : 
				switch(val2)
				{
					case 0 : 
					case 1 : 
					case 2 : 
				}
				break;

			// worcation style
			case 3 : 
				switch(val2)
				{
					case 0 : 
					case 1 : 
					case 2 : 
					case 3 : 
				}
				break;
			// °í°´¼¾ÅÍ
			case 4 : 
				switch(val2)
				{
					case 0 : 
						break;

					case 1 : 
						fnMemberJoinPop(); // È¸¿ø°¡ÀÔ
						break;

					case 2 : 
						fnMemberModifyPop(); // È¸¿ø¼öÁ¤
						break;

					case 3 : 
						fnMembershipPop(); // °í°´¼¾ÅÍ
						break;

					case 4 : 
						fnStorePop(); // ¸ÅÀåÃ£±â
						break;
						
					case 5 : 
						window.open('http://www.bstreet.co.kr/', 'ESHOP'); // E-SHOP
						break;
						
					case 6 : 
						fnMemberOutPop(); // È¸¿øÅ»Åð
						break;
				}
				break;

			// Bottom Menu
			case 5 : 
				switch(val2)
				{
					case 0 : 
						fnStoreSrchPop(); // ¸ÅÀå°³¼³¹®ÀÇ
						break;
					case 1 : 
						location.href = ''; // ½ºÅÜ¸ðÁý
						break;
					case 2 : 
						fnPrivacyPop(); // °³ÀÎÁ¤º¸º¸È£Á¤Ã¥
						break;
				}
				break;
		}
	}


