
//·Î±×ÀÎ¿©ºÎ¿¡ µû¶ó È­¸é ºÐ¸®
var UserIDCookieValue = getCookie("dcxLoginId");    //¾ÆÀÌµð  

if(UserIDCookieValue == null || UserIDCookieValue == "" || UserIDCookieValue == "_ERAnonymousUser") {
	printLoginMenu();
} else {
	printLogoutMenu();
}

//ÁÖ¹®´Ü°è¿¡¼­´Â ·Î±×ÀÎÀ» ÇÒ ¼ö ¾øµµ·Ï ÇÑ´Ù.
function OrderLoginChk(){
	var chk = ("ÁÖ¹®´Ü°è¿¡¼­´Â ·Î±×ÀÎ ÇÒ ¼ö ¾ø½À´Ï´Ù. È¸¿øÀ¸·Î ±¸¸ÅÇÏ½Ã·Á¸é Àå¹Ù±¸´Ï¿¡¼­ ´Ù½Ã ÁÖ¹®ÇÏ¼Å¾ß ÇÕ´Ï´Ù.\n\nÀå¹Ù±¸´Ï·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?");
	if (confirm(chk)){
		document.location.href = "/cart/cart_list.asp";
	}
}

//Áñ°ÜÃ£±âÃß°¡
var favoriteurl   = "http://www.dcx.co.kr" 
var favoritetitle = "¸ÅÀÏ¸ÅÀÏ Áñ°Å¿î °¨¼º ½ºÅ¸ÀÏ¸µ¼¥, dcx"
function addfavorites(){
	if (document.all)
	window.external.AddFavorite(favoriteurl,favoritetitle)
}

//·Î±×ÀÎ È¸¿ø¸Þ´º
function printLoginMenu(){
	var ReturnUrl;
	var strnowpage = location.href
	var tmpfirstIndex = strnowpage.indexOf("goUrl=")
	var tmplastIndex = strnowpage.length
	if(strnowpage.indexOf("goUrl=") >= 0){
		ReturnUrl = strnowpage.substring(tmpfirstIndex + 6, tmplastIndex)
	}else{
		ReturnUrl = escape(location.href);
	}
	if(strnowpage.indexOf("https") >= 0){
		dcx_http = "https://img.dcx.co.kr"
	}else{
		dcx_http = "http://img.dcx.co.kr"
	}
	document.writeln("<td><a href='javascript:addfavorites();' onMouseOut=\"MM_swapImage('Image225','','"+ dcx_http +"/images/header/favorite.gif',1)\" onMouseOver=\"MM_swapImage('Image225','','"+ dcx_http +"/images/header/favorite_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/favorite.gif' name='Image225' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/ico_point.gif'></td>");
	if (window.location.pathname == "/order/order_delivery.asp" || window.location.pathname == "/order/order_account.asp") {
		document.writeln("<td><a href='javascript:OrderLoginChk();' onMouseOut=\"MM_swapImage('Image224','','"+ dcx_http +"/images/header/login.gif',1)\" onMouseOver=\"MM_swapImage('Image224','','"+ dcx_http +"/images/header/login_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/login.gif' name='Image224' border='0' align='absmiddle'></a></td>");
	} else{
		document.writeln("<td><a href='https://www.dcx.co.kr/login/dcx_login.asp?goUrl="+ReturnUrl+"' onMouseOut=\"MM_swapImage('Image224','','"+ dcx_http +"/images/header/login.gif',1)\" onMouseOver=\"MM_swapImage('Image224','','"+ dcx_http +"/images/header/login_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/login.gif' name='Image224' border='0' align='absmiddle'></a></td>");
	}
	document.writeln("<td><img src='"+ dcx_http +"/images/header/ico_point.gif'></td>");
	document.writeln("<td><a href='https://www.dcx.co.kr/member/member_agree.asp' onMouseOut=\"MM_swapImage('Image222','','"+ dcx_http +"/images/header/join.gif',1)\" onMouseOver=\"MM_swapImage('Image222','','"+ dcx_http +"/images/header/join_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/join.gif' name='Image222' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/ico_point.gif'></td>");
	document.writeln("<td><a href='/cscenter/cscenter_main.asp' onMouseOut=\"MM_swapImage('Image221','','"+ dcx_http +"/images/header/cs.gif',1)\" onMouseOver=\"MM_swapImage('Image221','','"+ dcx_http +"/images/header/cs_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/cs.gif' name='Image221' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/ico_point.gif'></td>");
	document.writeln("<td><a href='/mystory/mypage.asp' onMouseOut=\"MM_swapImage('Image220','','"+ dcx_http +"/images/header/mystory.gif',1)\" onMouseOver=\"MM_swapImage('Image220','','"+ dcx_http +"/images/header/mystory_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/mystory.gif' name='Image220' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/ico_point.gif'></td><td><a href='/mystory/order.asp' onMouseOut=\"MM_swapImage('Image219','','"+ dcx_http +"/images/header/order.gif',1)\" onMouseOver=\"MM_swapImage('Image219','','"+ dcx_http +"/images/header/order_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/order.gif' name='Image219' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/ico_point.gif'></td>");
	document.writeln("<td width='70'><a href='/cart/cart_list.asp' onMouseOut=\"MM_swapImage('Image218','','"+ dcx_http +"/images/header/cart.gif',1)\" onMouseOver=\"MM_swapImage('Image218','','"+ dcx_http +"/images/header/cart_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/cart.gif' name='Image218' border='0' align='absmiddle'></a></td>");
	document.writeln("<td>&nbsp;</td>");
	document.writeln("<td><a href='javascript:mypro_conf();' onMouseOut=\"MM_swapImage('Image212','','"+ dcx_http +"/images/header/wishlist2.gif',1)\" onMouseOver=\"MM_swapImage('Image212','','"+ dcx_http +"/images/header/wishlist2_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/wishlist2.gif' name='Image212' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/green_line.gif'></td>");
	document.writeln("<td><a href='javascript:viewLayer(2);' onMouseOut=\"MM_swapImage('Image210','','"+ dcx_http +"/images/header/todayview2.gif',1)\" onMouseOver=\"MM_swapImage('Image210','','"+ dcx_http +"/images/header/todayview2_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/todayview2.gif' name='Image210' border='0' align='absmiddle'></a></td>");
	document.writeln("<td width='55' align='right'><a href='http://www.y-shop.co.kr' target='_blank' onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/yshop_logo.gif' name='Image211' border='0' align='absmiddle'></a></td>");
}

//·Î±×¾Æ¿ô È¸¿ø¸Þ´º
function printLogoutMenu(){
	var strnowpage = location.href
	if(strnowpage.indexOf("https") >= 0){
		dcx_http = "https://img.dcx.co.kr"
	}else{
		dcx_http = "http://img.dcx.co.kr"
	}
	document.writeln("<td><a href='javascript:addfavorites();' onMouseOut=\"MM_swapImage('Image225','','"+ dcx_http +"/images/header/favorite.gif',1)\" onMouseOver=\"MM_swapImage('Image225','','"+ dcx_http +"/images/header/favorite_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/favorite.gif' name='Image225' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/ico_point.gif'></td>");
	document.writeln("<td><a href='javascript:setLogOut();' onMouseOut=\"MM_swapImage('Image224','','"+ dcx_http +"/images/header/logout.gif',1)\" onMouseOver=\"MM_swapImage('Image224','','"+ dcx_http +"/images/header/logout_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/logout.gif' name='Image224' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/ico_point.gif'></td>");
	document.writeln("<td><a href='/mystory/member_edit.asp' onMouseOut=\"MM_swapImage('Image222','','"+ dcx_http +"/images/header/info.gif',1)\" onMouseOver=\"MM_swapImage('Image222','','"+ dcx_http +"/images/header/info_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/info.gif' name='Image222' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/ico_point.gif'></td>");
	document.writeln("<td><a href='/cscenter/cscenter_main.asp' onMouseOut=\"MM_swapImage('Image221','','"+ dcx_http +"/images/header/cs.gif',1)\" onMouseOver=\"MM_swapImage('Image221','','"+ dcx_http +"/images/header/cs_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/cs.gif' name='Image221' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/ico_point.gif'></td>");
	document.writeln("<td><a href='/mystory/mypage.asp' onMouseOut=\"MM_swapImage('Image220','','"+ dcx_http +"/images/header/mystory.gif',1)\" onMouseOver=\"MM_swapImage('Image220','','"+ dcx_http +"/images/header/mystory_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/mystory.gif' name='Image220' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/ico_point.gif'></td><td><a href='/mystory/order.asp' onMouseOut=\"MM_swapImage('Image219','','"+ dcx_http +"/images/header/order.gif',1)\" onMouseOver=\"MM_swapImage('Image219','','"+ dcx_http +"/images/header/order_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/order.gif' name='Image219' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/ico_point.gif'></td>");
	document.writeln("<td width='70'><a href='/cart/cart_list.asp' onMouseOut=\"MM_swapImage('Image218','','"+ dcx_http +"/images/header/cart.gif',1)\" onMouseOver=\"MM_swapImage('Image218','','"+ dcx_http +"/images/header/cart_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/cart.gif' name='Image218' border='0' align='absmiddle'></a></td>");
	document.writeln("<td>&nbsp;</td>");
	document.writeln("<td><a href='javascript:viewLayer(1);' onMouseOut=\"MM_swapImage('Image212','','"+ dcx_http +"/images/header/wishlist2.gif',1)\" onMouseOver=\"MM_swapImage('Image212','','"+ dcx_http +"/images/header/wishlist2_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/wishlist2.gif' name='Image212' border='0' align='absmiddle'></a></td>");
	document.writeln("<td><img src='"+ dcx_http +"/images/header/green_line.gif'></td>");
	document.writeln("<td><a href='javascript:viewLayer(2);' onMouseOut=\"MM_swapImage('Image210','','"+ dcx_http +"/images/header/todayview2.gif',1)\" onMouseOver=\"MM_swapImage('Image210','','"+ dcx_http +"/images/header/todayview2_.gif',1)\" onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/todayview2.gif' name='Image210' border='0' align='absmiddle'></a></td>");
	document.writeln("<td width='55' align='right'><a href='http://www.y-shop.co.kr' target='_blank' onFocus='this.blur();'><img src='"+ dcx_http +"/images/header/yshop_logo.gif' name='Image211' border='0' align='absmiddle'></a></td>");
}