/**************************************************************************
*						¸Þ´º°ü·Ã ¸µÅ© ¹× Location °ü·Ã
**************************************************************************/

/**************************************************************************
*	Linemap
**************************************************************************/
var menuArr_new = new Array();	
var r = 0;

//¼Ò½ºÆÄÀÏº° ÀÌ¸§¼±¾ð, ¼ø¼­´Â »ó°ü¾øÀ½.
//´Ü Detal ÆäÀÌÁö´Â ¿¬°áÇØ¼­ Á¤ÀÇ

//¸¶ÀÌÆäÀÌÁö
menuArr_new[r++] = new Array('MyOrderList.asp','³ªÀÇ ÁÖ¹®³»¿ª');
menuArr_new[r++] = new Array('MyRefundList.asp','¹ÝÇ°/Ãë¼Ò ³»¿ª');
menuArr_new[r++] = new Array('MyRefundList_Detail.asp','¹ÝÇ°/Ãë¼Ò »ó¼¼³»¿ª');
menuArr_new[r++] = new Array('MyReserveList.asp','³ªÀÇ Àû¸³±Ý ³»¿ª');
menuArr_new[r++] = new Array('MyCouponList.asp','³ªÀÇ ÄíÆù³»¿ª');
menuArr_new[r++] = new Array('MyPrdReView.asp','³ªÀÇ »óÇ°Æò');
menuArr_new[r++] = new Array('MyRefundEasyList.asp','EASY¹ÝÇ° ¼ÛÀåÀÔ·Â');
menuArr_new[r++] = new Array('MyQnAList.asp','1:1 Q&A');
menuArr_new[r++] = new Array('MyQnADetail.asp','1:1 Q&A »ó¼¼º¸±â');	 //»ó¼¼ÆäÀÌÁö´Â ÀÌÀüÆäÀÌÁö ¹Ù·Î µÚ¿¡ ¼±¾ðÇÑ´Ù.
menuArr_new[r++] = new Array('MyWishList.asp','Wish List');
menuArr_new[r++] = new Array('MyBrand.asp','My Brand');
menuArr_new[r++] = new Array('MyAccountsList.asp','°èÁÂ¹øÈ£°ü¸®');
menuArr_new[r++] = new Array('MyAddressList.asp','¹è¼ÛÁöÁÖ¼Ò°ü¸®');
menuArr_new[r++] = new Array('MypageSetting.asp','¸ÂÃãÁ¤º¸¼³Á¤');
menuArr_new[r++] = new Array('JoinModify.asp','°³ÀÎÁ¤º¸ º¯°æ');
menuArr_new[r++] = new Array('JoinModifyOK.asp','°³ÀÎÁ¤º¸ º¯°æ¿Ï·á');
menuArr_new[r++] = new Array('JoinMemberOut.asp','È¸¿øÅ»Åð ½ÅÃ»');
menuArr_new[r++] = new Array('JoinMemberOutFinish.asp','È¸¿øÅ»Åð ½ÅÃ»¿Ï·á');

//°í°´¼¾ÅÍ
menuArr_new[r++] = new Array('Faq_HalfMall.asp?gubun=3','ÁÖ¹®°áÀç ¹®ÀÇ');
menuArr_new[r++] = new Array('Faq_HalfMall.asp?gubun=4','¹è¼Û ¹®ÀÇ');
menuArr_new[r++] = new Array('Faq_HalfMall.asp?gubun=5','±³È¯ ¹®ÀÇ');
menuArr_new[r++] = new Array('Faq_HalfMall.asp?gubun=6','¹ÝÇ°/È¯ºÒ ¹®ÀÇ');
menuArr_new[r++] = new Array('Faq_HalfMall.asp?gubun=8','ÄíÆù/Àû¸³±Ý ¹®ÀÇ');
menuArr_new[r++] = new Array('Faq_HalfMall.asp?gubun=2','»óÇ° ¹®ÀÇ');
menuArr_new[r++] = new Array('Faq_HalfMall.asp?gubun=1','È¸¿øÁ¤º¸ ¹®ÀÇ');
menuArr_new[r++] = new Array('Faq_HalfMall.asp?gubun=9','ºñÈ¸¿ø ¹®ÀÇ');

menuArr_new[r++] = new Array('Guide_Global_Using.asp?gubun=1','ÇØ¿Ü¹è¼Û ÀÌ¿ë¹æ¹ý');
menuArr_new[r++] = new Array('Guide_Global_Attention.asp?gubun=2','ÇØ¿Ü¹è¼Û À¯ÀÇ»çÇ×');
menuArr_new[r++] = new Array('Guide_Global_Card.asp?gubun=3','ÇØ¿ÜÄ«µå °áÁ¦¾È³»');
menuArr_new[r++] = new Array('Guide_Global_Agr.asp?gubun=5','ÇØ¿Ü¹è¼Û ÀÌ¿ë¾à°ü');
menuArr_new[r++] = new Array('Guide_Global_FAQ.asp?gubun=6','ÇØ¿Ü¹è¼Û FAQ');
menuArr_new[r++] = new Array('Guide_Global_Brands.asp?gubun=7','ÇØ¿Ü¹è¼Û ºê·£µå');

menuArr_new[r++] = new Array('GuideCoupon.asp','ÄíÆùÀÌ¿ë¾È³»');
menuArr_new[r++] = new Array('GuideDelivery.asp','¹è¼ÛÁ¤Ã¥');
menuArr_new[r++] = new Array('GuideRebate.asp','¹ÝÇ°/È¯ºÒ¾È³»');
menuArr_new[r++] = new Array('GuidePoint.asp','Àû¸³±Ý¾È³»');
menuArr_new[r++] = new Array('GuideCompen.asp','6ÀÏº¸»óÁ¦');
menuArr_new[r++] = new Array('Policy.asp','°³ÀÎÁ¤º¸Ãë±Þ¹æÄ§');
menuArr_new[r++] = new Array('Agreement.asp','ÀÌ¿ë¾à°ü');

menuArr_new[r++] = new Array('GuideCancle_Easy.asp','EASY È¯ºÒ/¹ÝÇ°');

menuArr_new[r++] = new Array('NoticeList.asp?gubun=n','°øÁö»çÇ×');
menuArr_new[r++] = new Array('NoticeView.asp?gubun=n','°øÁö»çÇ×');

//º¸¸®½ºÅ¸ÀÏ
menuArr_new[r++] = new Array('StyleList.asp','º¸¸®½ºÅ¸ÀÏ(ÀüÃ¼)');

//º¸¸®Å¬·´
menuArr_new[r++] = new Array('BoriModel_List.asp','Bori Model');
menuArr_new[r++] = new Array('BoriModel_List_N.asp','Bori Model µµÀü');
menuArr_new[r++] = new Array('BoriModel_Write_N.asp','Bori Model µµÀü');
menuArr_new[r++] = new Array('BoriModel_Gallery_List.asp','Bori Model ¸í¿¹ÀÇ Àü´ç');
menuArr_new[r++] = new Array('BoriModel_Gallery_View.asp','Bori Model ¸í¿¹ÀÇ Àü´ç');
menuArr_new[r++] = new Array('BoriDiary_List.asp','Bori Diary');
menuArr_new[r++] = new Array('BoriDiary_TopList.asp','Bori Diary List');
menuArr_new[r++] = new Array('BoriDiary_Write.asp','Bori Diary Write');
menuArr_new[r++] = new Array('BoriDiary_View.asp','Bori Diary View');
menuArr_new[r++] = new Array('BoriReview_List.asp','Bori »óÇ°Æò/»óÇ°ÈÄ±â');
menuArr_new[r++] = new Array('BoriModel_Month.asp','Bori °¶·¯¸®');

//·Î±×ÀÎ,È¸¿ø°¡ÀÔ
menuArr_new[r++] = new Array('Login.asp','·Î±×ÀÎ');
menuArr_new[r++] = new Array('Join.asp','È¸¿ø°¡ÀÔ');
menuArr_new[r++] = new Array('JoinAgree.asp','È¸¿ø°¡ÀÔ');
menuArr_new[r++] = new Array('JoinAgree.asp?GlobalGubun=1','È¸¿ø°¡ÀÔ(¿Ü±¹ÀÎ/±¹³»°ÅÁÖ)');
menuArr_new[r++] = new Array('JoinAgree.asp?GlobalGubun=2','È¸¿ø°¡ÀÔ(¿Ü±¹ÀÎ/ÇØ¿Ü°ÅÁÖ)');

//°Ë»ö
menuArr_new[r++] = new Array('Search.asp','¾ÆÀÌÅÛ ¸®½ºÆ®');

//º¸¸®¶óÀÌÇÁ
//menuArr_new[r++] = new Array('Life.asp','¾ÆÀÌÅÛ ¸®½ºÆ®');
//menuArr_new[r++] = new Array('Search.asp','¾ÆÀÌÅÛ ¸®½ºÆ®');

function dispmap()
{
	//alert(document.location.href);
	//alert(document.location.pathname);

	//¿ì¼± ±âº»ÀûÀ¸·Î HomeÀº Âï¾îÁØ´Ù.
	document.write("<img src='/Images/Common/Icon/Home.gif' style='margin: 0 5px 0 0'><a HREF='/index.asp' class='a_linemap' onFocus='this.blur()'>Home</a>");

	//server urlÁ¤º¸Áß Ã¹¹øÂ° Æú´õºÎÅÍ °Ë»öÇÏ¿© ÁöÁ¤ÇÑ´Ù.
	//ÇöÀç º¸¸®´Â 1depth ±¸Á¶ÀÌ¹Ç·Î Â÷ÈÄ¿¡ °³¼± (½ÇÁúÀûÀÎ ±¸Á¶°¡ 1depthÀÎµ¥ Ç¥½Ã°¡ 2depthÀÌ¸é ÇÏµåÄÚµù ¶Ç´Â Æú´õ¸¦ »ý¼ºÇÏ¿© ±¸Çö)
	var tempurl = document.location.pathname.toUpperCase();
	var tempurl2 = tempurl;	
	var tempSrc = "";

	tempurl = tempurl.split("/");
	//ÇöÀç´Â MyPage¿Í °í°´¼¾ÅÍ¸¸... Ãß°¡ÇÏ¸é µÊ..

	var tempDir, tempDir1;
	//µÚ¿¡ ÆÄ¶ó¹ÌÅÍ°¡ ºÙ¾ú´ÂÁö È®ÀÎÇÑ´Ù.
	//ÆÄ¶ó¹ÌÅÍ°¡ ÀÖ´Â°ÍÀº ´Ù¸¥ Æú´õ¿¡ ÀÖ´Â°ÍÀ» ¸ÅÄªÇÏ±â À§ÇØ¼­ÀÓ.

	//alert(tempurl[2]);

	//ÁÖ¼Ò¿¡ ÆÄ¶ó¹ÌÅÍ Á¤º¸°¡ ÀÖÀ¸¸é.. ÇöÀç °³ÀÎÁ¤º¸/È¸¿øÅ»Åð¸¸ ÇØ´ç
	//if (document.location.href.indexOf("?") > 0 && tempurl[1].toUpperCase() != "CUSTOMER" && tempurl[1].toUpperCase() != "STYLE" && tempurl[1].toUpperCase() != "MYPAGE")
	if (document.location.href.indexOf("?") > 0 && tempurl[1].toUpperCase() == "MEMBER")
	{				
		tempDir = document.location.href.split("=");

		//ÆÄ¶ó¹ÌÅÍ°ªÀÌ 2°³ ÀÖÀ¸¸é µð·ºÅä¸®¸íÀ» °¡Á®¿Â´Ù.
		if(document.location.href.indexOf("&") > 0)
		{
			tempDir = tempDir[1].toUpperCase();
			tempDir = tempDir.split("&");
			tempDir = tempDir[0];
		}
		else	 //1°³ÀÌ¸é..
		{
			tempDir = tempDir[1].toUpperCase();
		}
	}
	else	 //ÆÄ¶ó¹ÌÅÍ°¡ ¾ø´Â°ÍÀ» °æ·ÎÁß¿¡ Æú´õ¸íÀ» ±âÁØÀ¸·Î °¡Á®¿Â´Ù.
	{
		tempDir = tempurl[1];
	}
	
//	alert(tempurl[1]);
	var tempSource;
	switch(tempDir)
	{
		case "MYPAGE":
			tempSource = "MypageMain.asp";
			document.write("<img src='/Images/Common/Icon/LineMap.gif' style='margin:0 4px 0 4px;'>");
			if(tempurl[tempurl.length-1] != tempSource.toUpperCase())
				document.write("<a href='/Mypage/MypageMain.asp' class='a_linemap'>My Bori</a>");
			else
				document.write("<span class='linemap_here'>My Bori</span>");
			break;
		case "CUSTOMER":
			tempSource = "Main.asp";
			document.write("<img src='/Images/Common/Icon/LineMap.gif' style='margin:0 4px 0 4px;'>");
			if(tempurl[tempurl.length-1] != tempSource.toUpperCase())
				document.write("<a href='Customer/main.asp' class='a_linemap'>Help Desk</a>");
			else
				document.write("<span class='linemap_here'>Help Desk</span>");			
			break;	
		case "STYLE":
			tempSource = "BoriStyle.asp";
			document.write("<img src='/Images/Common/Icon/LineMap.gif' style='margin:0 4px 0 4px;'>");
			if(tempurl[tempurl.length-1] != tempSource.toUpperCase())
				document.write("<a href='/Style/BoriStyle.asp?Gubun=K' class='a_linemap'>BORI STYLE</a>");
			else
				document.write("<span class='linemap_here'>BORI STYLE</span>");			
			break;	
		case "CLUB":
			tempSource = "BoriClub.asp";
			document.write("<img src='/Images/Common/Icon/LineMap.gif' style='margin:0 4px 0 4px;'>");
			if(tempurl[tempurl.length-1] != tempSource.toUpperCase())
				document.write("<a href='/Club/BoriClub.asp' class='a_linemap'>Bori Club</a>");
			else
				document.write("<span class='linemap_here'>Bori Club</span>");			
			break;	
		case "LIFE":
			tempSource = "LIFE.asp";
			document.write("<img src='/Images/Common/Icon/LineMap.gif' style='margin:0 4px 0 4px;'>");
//			if(tempurl[tempurl.length-1] != tempSource.toUpperCase())
//				document.write("<a href='/LIFE/LIFE.asp' class='a_linemap'>Bori Life</a>");
//			else
				document.write("<span class='linemap_here'>Bori Life</span>");			
			break;	
	}

	// depth°¡ 4ÀÎ Á¤º¸¸¦ °¡Á®¿Â´Ù.
	// »ó¼¼ÆäÀÌÁöÀÇ ÆÄÀÏ¸íÀº ¿øº»ÆÄÀÏ¿¡ _detailÀ» ºÙ¿©ÁÖ´Â°ÍÀ» ±ÔÁ¤ÇÑ´Ù.
	var tempstr = tempurl[tempurl.length-1];
	tempstr = tempstr.replace(/_detail.asp/gi, ".ASP");

	
	// depth°¡ 4ÀÎÁ¤º¸°¡ ÀÖÀ¸¸é..
	if(tempurl2.indexOf("DETAIL.ASP") > 0)
	{		
		for(j=0; j<menuArr_new.length; j++)
		{
			if (menuArr_new[j][0].toUpperCase()==tempstr)
			{
				document.write("<img src='/Images/Common/Icon/LineMap.gif' style='margin:0 4px 0 4px;'>");
				switch(tempstr)
				{
						case "MYQNADETAIL.ASP": 
							document.write("<a href='/MyPage/MyQnAList.asp' class='a_linemap'>"+menuArr_new[--j][1]+"</a>"); 
							break;
						default:
							document.write("<a href='Customer/main.asp' class='a_linemap'>"+menuArr_new[j][1]+"</a>"); 
							break;
				}
				
				j = menuArr_new.length;
			}
		}
	}

	//alert(tempurl[tempurl.length-1]);


	//°í°´Áö¿øÀÎ °æ¿ì µ¿ÀÏÆÄÀÏ¿¡¼­ para°ª¿¡ µû¶ó ´Ù¸£°Ô Ç¥½ÃÇÏ±â ¶§¹®¿¡ ½ÇÁ¦¼Ò½ºÆÄÀÏ ±¸ºÐ...
	if (document.location.href.indexOf("?") > 0 && tempurl[1].toUpperCase() == "CUSTOMER" && document.location.href.indexOf(".asp?view=") < 0)
	{
		
		var tpara, tpara1;
		tpara = document.location.href.split("?");
		if(tpara[1].indexOf("&") > 0)
		{
			tpara1 = tpara[1];
			tpara1 = tpara1.split("&");
			tempSrc = tempurl[tempurl.length-1] + "?" + tpara1[0].toUpperCase();		
		}
		else
		{
			tempSrc = tempurl[tempurl.length-1] + "?" + tpara[1].toUpperCase();		
		}
	}
	else
	{
		tempSrc = tempurl[tempurl.length-1];		
	}

	//alert(tempSrc);

	//¹è¿­·Î ÁöÁ¤Á¤º¸¸¦ °Ë»öÇÑ´Ù.
	for (j=0; j<menuArr_new.length; j++)
	{
		//¹è¿­·Î °Ë»öÇÑ Á¤º¸¿Í server urlÁ¤º¸°¡ ÀÏÄ¡ÇÏ¸é ¹è¿­ÀÇ Á¤º¸¸¦ Ãâ·ÂÇÑ´Ù.
		if (menuArr_new[j][0].toUpperCase()==tempSrc)
		{
			document.write("<img src='/Images/Common/Icon/LineMap.gif' style='margin:0 4px 0 4px;'>");
			document.write("<span class='linemap_here'>"+menuArr_new[j][1]+"</span>");
			j = menuArr_new.length;
		}
	}
}