var dir;
/*====================================================================================
'  ÆÄÀÏ¸í              : indicator.js
'  ÆÄÀÏ¼³¸í            : ÆäÀÌÁö indicator Á¤ÀÇ
'  ÀÛ¼ºÀÏÀÚ            : 2005/10/10
'  ÀÛ¼ºÀÚ              : ±èÇö
'  ¼öÁ¤ÀÏ(»çÀ¯)        : .. (..)
'=====================================================================================*/

var dir_url;
var dir_title;
var cate;
var sub_title;
var sub_link;
var depth_bg;
var depth_tilte;
var depth_name;


function indicator(value)
{
    var top = value.substring(0,1)*1; //1depth
    var sub = value.substring(1,2)*1; //2depth
    var depth = value.substring(2,3)*1; //3depth

    if(sub == 0)
    {}
    else
    {
	    main_menu(top);
	    sub_menu(top,sub);
	
//Ãâ·Â ½ÃÀÛ
        if(depth)
        {
            document.write ("<table width='700' height='36' border='0' cellpadding='0' cellspacing='0'><tr><td background='"+depth_bg[depth-1]+"' align='right'><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"padding:3 16 0 0\">");
        }
        else
        {
            document.write ("<table width='700' height='36' border='0' cellpadding='0' cellspacing='0'><tr><td background='"+depth_bg[depth]+"' align='right'><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"padding:3 16 0 0\">");
        }

        document.write ("	<tr><td align=\"right\" valign=\"top\">");
        document.write ("<a href=\"/main.asp\"><img src='/imgs/btn/btn_home.gif'  border='0' align='absmiddle' hspace='5' style='margin-top:-2'></a>");
        
        if (top != 8) //Á¦³Ê·² ¸Þ´º´Â Á¦¿Ü_2005_12_12
        {
            document.write ("<a href=\""+dir+dir_url+"\" class=\"line\">"+dir_title+"</a>");
        }
	
        if (sub) 
        {
            if (top != 8) //Á¦³Ê·² ¸Þ´º´Â Á¦¿Ü_2005_12_12
            {
                if (depth)
                {
                    document.write (" <img src='/imgs/comm/bu/arr_1.gif' width='3' height='6' border='0' align='absmiddle' style='margin-top:-1'> <a href=\""+sub_link[sub-1]+"\" class=\"line\">"+sub_title[sub-1]+"</a>");
                    document.write (" <img src='/imgs/comm/bu/arr_1.gif' width='3' height='6' border='0' align='absmiddle' style='margin-top:-1'> <b class="+cate+">"+depth_title[depth-1]+"</span>");
                }
                else
                {
                    document.write (" <img src='/imgs/comm/bu/arr_1.gif' width='3' height='6' border='0' align='absmiddle' style='margin-top:-1'> <b class="+cate+">"+sub_title[sub-1]+"</span>");
                }
            }
            else
            {
                if (depth)
                {
                    document.write (" <a href=\""+sub_link[sub-1]+"\" class=\"line\">"+sub_title[sub-1]+"</a>");
                    document.write (" <b class="+cate+">"+depth_title[depth-1]+"</span>");
                }
                else
                {
                    document.write (" <b class="+cate+">"+sub_title[sub-1]+"</span>");
                }
            }
        }

        depth_name = "";
        document.write ("		</td></tr>");
        document.write ("</table></td></tr></table>");
    }
//Ãâ·Â ³¡
}


function main_menu(top,sub)
{
    switch (top)
	{
		case 1: // °ÔÀÓ¼¥
			dir	= "/gameshop/";
			dir_url = "gs_main.asp";
			dir_title = "°ÔÀÓ¼¥";
			cate="cate1"
			sub_title = ["°ÔÀÓ","¾ÆÀÌÅÛ","È®ÀåÆÑ","Àü¹®°¡ ¸®ºä","ÇÁ¸®¹Ì¾ö °ÔÀÓ","ºê·£µå °ÔÀÓ","½Å±Ô °ÔÀÓ","ÀÎ±â °ÔÀÓ","´ë±â °ÔÀÓ","ÀüÃ¼ °ÔÀÓ"];
			sub_link = ["/gameshop/gs_game_main.asp?catcode=111","/GameShop/gs_ItemNExtend_main.asp?ItemNExtend=I","/GameShop/gs_ItemNExtend_main.asp?ItemNExtend=E","","","",""];
			break;
		case 2:	// ÁöÆÎÆù
			dir	= "/phone/";
			dir_url = "ph_main.asp";
			dir_title = "ÁöÆÎÆù";
			cate="cate2"
			sub_title = ["ÁöÆÎÆù ¼Ò°³","Æùº°Áö¿ø °ÔÀÓ","Àü¹®°¡ ¸®ºä"];
			sub_link = ["/phone/ph_info1.asp","/phone/ph_game.asp?mobile_code=1064","/phone/ph_list.asp"];
			break;
		case 3:	// Ä¿¹Â´ÏÆ¼
			dir	= "/community/";
			dir_url = "cm_main.asp";
			dir_title = "Ä¿¹Â´ÏÆ¼";
			cate="cate3"
			sub_title = ["ÁöÆÎÅäÅ©","°ÔÀÓ ÅäÅ©","Æù ÅäÅ©","º£½ºÆ® ÅäÅ©","ÁöÆÎÀÚÅ°"];
			sub_link = ["/community/free/cm_freeretrieve.asp","/community/capture/cm_capturerandomretrieve.asp","/community/phone/cm_phoneretrieve.asp?mobile_code=1064","/community/besttalk/cm_besttalkretrieve.asp"];
			break;
		case 4:	// ·©Å·&¹èÆ²
			dir	= "/rankingbattle/";
			dir_url = "RB_main.asp";
			cate="cate4"
			dir_title = "·©Å·&¹èÆ²";
			sub_title = ["·©Å·","¹èÆ²","ÁöÆÎ ±â³×½º"];
			sub_link = ["/rankingbattle/RB_ranktotal.asp","/rankingbattle/RB_inst.asp","","","",""];
			break;
        case 5:	// ÇïÇÁµ¥½ºÅ©
            dir	= "/help/";
            dir_url = "hd_main.asp";
            dir_title = "ÇïÇÁµ¥½ºÅ©";
            cate="cate5"
            sub_title = ["»ó´ãÄÚ³Ê","ÁöÆÎ°¡ÀÌµå","»çÀÌÆ®°¡ÀÌµå","ÁöÆÎ¾Ë¸®¹Ì","ºê·£µåÀÌ¾ß±â","ÀÚ·á½Ç","ÁöÆÎÁ¤Ã¥"];
            sub_link = ["/help/faq/hd_faqretrieve.asp","/help/gpang/about.asp","/help/site/shop.asp","/help/notice/hd_noticeretrieve.asp","/help/brand/bi.asp","/help/pds/hd_pdsretrieve.asp","/help/policy/clause.asp"];
            break;
		case 6: // KOIN
			dir	= "/koin/";
			dir_url = "ki_main.asp";
			dir_title = "KOIN";
			sub_title = ["KOIN »ç¿ë³»¿ª","KOIN FAQ"];
			sub_link = ["/koin/ki_main.asp","/koin/ki_Account.asp","/koin/ki_Help.asp"];
			break;
		case 7: // ¸¶ÀÌÁöÆÎ
			dir	= "/mygpang/";
			dir_url = "mg_main.asp";
			cate="cate7"
			dir_title = "¸¶ÀÌÁöÆÎ";
			sub_title = ["³» °ÔÀÓ Á¾ÇÕÁ¤º¸","³» ±¸¸Å³»¿ª","³» ¼±¹°ÇÔ","³» ÂÊÁöÇÔ","³» ¼Ò¸ÁÇÔ","³» Ä£±¸","³» ·©Å·Æ÷ÀÎÆ®","³» Á¤º¸"];
			sub_link = ["/mygpang/mg_MyGameInfo.asp","/mygpang/mg_Buylist.asp","/mygpang/mg_ReceiveList.asp","/mygpang/mg_Msglist.asp","/mygpang/mg_zzimlist.asp","/mygpang/mg_friend_list.asp","","",""];
			break;
	case 8: // Á¦³Ê·²
		dir	= "";
		dir_url = "";
		cate="cate8"
		dir_title = "Á¦³Ê·²";
		sub_title = ["·Î±×ÀÎ","»çÀÌÆ® ¸Ê","ÅëÇÕ°Ë»ö","È¸¿ø°¡ÀÔ","Ã¼Çè°ú"];
		sub_link = ["","","","",""];
		break;
	default :
		sw = false;
	}
}


function sub_menu(top,sub)
{
	if (top == 1)
	{
		if (sub == 1)
	    {
			depth_title = ["½Å±Ô °ÔÀÓ","ÀÎ±â °ÔÀÓ","´ë±â °ÔÀÓ","ÀüÃ¼ °ÔÀÓ","½Å±Ô °ÔÀÓ »ó¼¼","ÀÎ±â °ÔÀÓ »ó¼¼","ÀüÃ¼ °ÔÀÓ »ó¼¼","±¸¸ÅÇÏ±â","¼±¹°ÇÏ±â"];
			depth_bg = ["/imgs/shop/title_111.gif","/imgs/shop/title_112.gif","/imgs/shop/title_114.gif","/imgs/shop/title_113.gif","/imgs/shop/title_111.gif","/imgs/shop/title_112.gif","/imgs/shop/title_113.gif","/imgs/shop/title_170.gif","/imgs/shop/title_180.gif"];
		}
		if (sub == 2)
		{
			depth_title = ["ÀüÃ¼ ¾ÆÀÌÅÛ","°ÔÀÓº° ¾ÆÀÌÅÛ","ÀüÃ¼ ¾ÆÀÌÅÛ »ó¼¼","°ÔÀÓº° ¾ÆÀÌÅÛ »ó¼¼","","","","±¸¸ÅÇÏ±â","¼±¹°ÇÏ±â"];
			depth_bg = ["/imgs/shop/title_121.gif","/imgs/shop/title_122.gif","/imgs/shop/title_121.gif","/imgs/shop/title_122.gif","","","","/imgs/shop/title_170.gif","/imgs/shop/title_180.gif"];
		}
		if (sub == 3) {
			depth_title = ["ÀüÃ¼ È®ÀåÆÑ","°ÔÀÓº° È®ÀåÆÑ","ÀüÃ¼ È®ÀåÆÑ »ó¼¼","°ÔÀÓº° È®ÀåÆÑ »ó¼¼","","","","±¸¸ÅÇÏ±â","¼±¹°ÇÏ±â"];
			depth_bg = ["/imgs/shop/title_131.gif","/imgs/shop/title_133.gif","/imgs/shop/title_131.gif","/imgs/shop/title_133.gif","","","","/imgs/shop/title_170.gif","/imgs/shop/title_180.gif"];
		}
		if (sub == 4) 
		{
			depth_title = ["Àü¹®°¡ ¸®ºä","Àü¹®°¡ ¸®ºä »ó¼¼"];
			depth_bg = ["/imgs/shop/title_140.gif","/imgs/shop/title_112.gif"];
		}
		if (sub == 5) 
		{
			depth_title = ["ÇÁ¸®¹Ì¾ö °ÔÀÓ","ÇÁ¸®¹Ì¾ö °ÔÀÓ »ó¼¼"];
			depth_bg = ["/imgs/shop/title_150.gif","/imgs/shop/title_150.gif"];
		}
		if (sub == 6) 
		{
			depth_title = ["ºê·£µå °ÔÀÓ","ºê·£µå °ÔÀÓ »ó¼¼"];
			depth_bg = ["/imgs/shop/title_160.gif","/imgs/shop/title_160.gif"];
		}

		if (sub == 7) 
		{
			depth_title = ["½Å±Ô°ÔÀÓ","½Å±Ô °ÔÀÓ »ó¼¼","º¹ÇÕ»óÇ°"];
			depth_bg = ["/imgs/shop/title_111.gif","/imgs/shop/title_111.gif","/imgs/shop/title_111.gif"];
		}
		if (sub == 11) 
		{
			depth_title = ["½Å±Ô °ÔÀÓ","ÀÎ±â °ÔÀÓ","´ë±â °ÔÀÓ","ÀüÃ¼ °ÔÀÓ"];
			depth_bg = ["","","",""];
		}
	}
	if (top == 2) 
	{
		if (sub == 1) 
		{
			depth_title = ["SPH-B3200","SPH-G1000","LG-KV3600"];
			depth_bg = ["/imgs/phone/title_213.gif","/imgs/phone/title_212.gif","/imgs/phone/title_211.gif"];
		}
		if (sub == 2) 
		{
			depth_title = ["SPH-B3200","SPH-G1000","LG-KV3600"];
			depth_bg = ["/imgs/phone/title_223.gif","/imgs/phone/title_222.gif","/imgs/phone/title_221.gif"];
		}
		 if (sub == 3) 
		{
			depth_title = ["Àü¹®°¡ ¸®ºä"];
			depth_bg    = ["/imgs/phone/title_230.gif"];
		}
	}
	if (top == 3) 
	{
		if (sub == 1) 
		{
			depth_title = ["ÀÚÀ¯ °Ô½ÃÆÇ","ÁöÆÎ °¶·¯¸®","¾ó¸® ¸®ºä","¶óÀÌºê ¸®¼­Ä¡","Áú¹®°ú ´äº¯"];
			depth_bg    = ["/imgs/community/title_311.gif","/imgs/community/title_312.gif","/imgs/community/title_313.gif","/imgs/community/title_314.gif","/imgs/community/title_315.gif"];
		}
		if (sub == 2) 
		{
			//depth_title = ["°ÔÀÓ ÄÃ·³","³ª¸¸ÀÇ °ø·«","°ÔÀÓ Q&A","°ÔÀÓ ÈÄ±â","°ÔÀÌ¸Ó ÆòÁ¡"];
			//depth_bg    = ["/imgs/community/title_321.gif","/imgs/community/title_322.gif","/imgs/community/title_323.gif","/imgs/community/title_324.gif","/imgs/community/title_325.gif"];
            depth_title = ["³ª¸¸ÀÇ °ø·«","°ÔÀÓ Q&A","°ÔÀÓ ÈÄ±â","°ÔÀÌ¸Ó ÆòÁ¡"];
            depth_bg    = ["/imgs/community/title_322.gif","/imgs/community/title_323.gif","/imgs/community/title_324.gif","/imgs/community/title_325.gif"];
		}
		if (sub == 3) 
		{
			depth_title = ["B3200 »ç¿ëÀÚ ¸ðÀÓ","G1000 »ç¿ëÀÚ ¸ðÀÓ","KV3600 »ç¿ëÀÚ ¸ðÀÓ"];
			depth_bg    = ["/imgs/community/title_333.gif","/imgs/community/title_332.gif","/imgs/community/title_331.gif"];
		}
        if (sub == 4) 
		{
			depth_title = ["º£½ºÆ® ÅäÅ©"];
			depth_bg    = ["/imgs/community/title_340.gif"];
		}
        if (sub == 5) 
		{
			depth_title = ["ÁöÆÎ ÀÚÅ°"];
			depth_bg    = ["/imgs/community/title_350.gif"];
		}
		/*
		if (sub == 4) 
		{
			depth_title = ["KV3600 À¯Àú ¸ðÀÓ"];
			depth_bg = ["/imgs/community/title_340.gif"];
		}
		*/
	}
	if (top == 4)
	{
		if (sub == 1)
		{
			depth_title = ["ÁöÆÎ ·©Å·","°ÔÀÓº° ·©Å·","¹èÆ² ·©Å·"];
			depth_bg = ["/imgs/rnb/title_411.gif","/imgs/rnb/title_412.gif","/imgs/rnb/title_413.gif"];
		}
		if (sub == 2)
		{
			depth_title = ["¹èÆ² ¾È³»","¹èÆ² Âü°¡"];
			depth_bg = ["/imgs/rnb/title_421.gif","/imgs/rnb/title_422.gif"];
		}
		if (sub == 3)
		{
			depth_title = ["ÁöÆÎ ±â³×½º"];
			depth_bg = ["/imgs/rnb/title_430.gif"];
		}
	}
    if (top == 5) {
		if (sub == 1) {
			depth_title = ["ÀÚÁÖ ¹¯´Â Áú¹®","¹®ÀÇÇÏ±â","³» Áú¹® ¸ñ·Ï"];
			depth_bg = ["/imgs/help/title_511.gif","/imgs/help/title_512.gif","/imgs/help/title_513.gif"];
		}
		if (sub == 2) {
			depth_title = ["ÁöÆÎÀÌ¶õ","ÁöÆÎ¿ä±Ý","USB¼³Ä¡","ÁöÆÎ ½ÌÅ© ¸Å´ÏÀú","°ÔÀÓ ½ÇÇà"];
			depth_bg = ["/imgs/help/title_521.gif","/imgs/help/title_522.gif","/imgs/help/title_523.gif","/imgs/help/title_524.gif","/imgs/help/title_525.gif"];
		}
		if (sub == 3) {
			depth_title = ["°ÔÀÓ¼¥","ÁöÆÎ·©Å·","°ÔÀÓº° ·©Å·","ÁöÆÎ¹èÆ²","KOIN"];
			depth_bg = ["/imgs/help/title_531.gif","/imgs/help/title_532.gif","/imgs/help/title_533.gif","/imgs/help/title_534.gif","/imgs/help/title_535.gif"];
		}
		if (sub == 4) {
			depth_title = ["°øÁö»çÇ×","ÀÌº¥Æ®"];
			depth_bg = ["/imgs/help/title_541.gif","/imgs/help/title_542.gif"];
		}
		if (sub == 5) {
			depth_title = ["BI & LOGO","CF º¸±â","¿ùÆäÀÌÆÛ"];
			depth_bg = ["/imgs/help/title_551.gif","/imgs/help/title_552.gif","/imgs/help/title_553.gif"];            
		}
		if (sub == 6) {
			depth_title = ["ÀÚ·á½Ç"];
			depth_bg = ["/imgs/help/title_560.gif"];
		}
		if (sub == 7) {
			depth_title = ["ÀÌ¿ë¾à°ü","°³ÀÎÁ¤º¸º¸È£Á¤Ã¥ ¹× Ã»¼Ò³âº¸È£Á¤Ã¥","¸ÞÀÏÁÖ¼Ò ¹«´Ü ¼öÁý °ÅºÎ"];
			depth_bg = ["/imgs/help/title_571.gif","/imgs/help/title_572.gif","/imgs/help/title_573.gif"];
		}
	}
    if (top == 6) {
		if (sub == 1) {
			depth_title = ["KOIN »ç¿ë³»¿ª"];
			depth_bg = ["/imgs/koin/title_610.gif"];
		}
		if (sub == 2) {
			depth_title = ["KOIN FAQ"];
			depth_bg = ["/imgs/koin/title_630.gif"];
		}
    }

	if (top == 7) {
		if (sub == 1) {
			depth_title = ["³» °ÔÀÓ ¸ñ·Ï","³» °ÔÀÓ ´ÙÀÌ¾î¸®"];
			depth_bg = ["/imgs/mygpang/title_711.gif","/imgs/mygpang/title_712.gif"];
		}
		if (sub == 2) {
			depth_title = [""];
			depth_bg = ["/imgs/mygpang/title_720.gif"];
		}
		if (sub == 3) {
			depth_title = ["","¼±¹°ÇÏ±â"];
			depth_bg = ["/imgs/mygpang/title_730.gif","/imgs/shop/title_180.gif"];
		}
		if (sub == 4) {
			depth_title = [""];
			depth_bg = ["/imgs/mygpang/title_740.gif"];
		}
		if (sub == 5) {
			depth_title = ["","¼±¹°ÇÏ±â","±¸¸ÅÇÏ±â",,,,,"±¸¸ÅÇÏ±â","¼±¹°ÇÏ±â"];
			depth_bg = ["/imgs/mygpang/title_750.gif","/imgs/shop/title_180.gif","/imgs/shop/title_170.gif",,,,,"/imgs/shop/title_170.gif","/imgs/shop/title_180.gif"];
		}
		if (sub == 6) {
			depth_title = [""];
			depth_bg = ["/imgs/mygpang/title_760.gif"];
		}
		if (sub == 7) {
			depth_title = [""];
			depth_bg = ["/imgs/mygpang/title_770.gif"];
		}
		if (sub == 8) {
			depth_title = [""];
			depth_bg = ["/imgs/mygpang/title_790.gif"];
		}
	}
	if (top == 8) {
		if (sub == 1) {
			depth_title = ["·Î±×ÀÎ"];
			depth_bg = ["/imgs/general/title_810.gif"];
		}
		if (sub == 2) {
			depth_title = ["»çÀÌÆ®¸Ê"];
			depth_bg = ["/imgs/general/title_820.gif"];
		}
		if (sub == 3) {
			depth_title = ["ÅëÇÕ°Ë»ö"];
			depth_bg = ["/imgs/general/title_830.gif"];
		}
		if (sub == 4) {
			depth_title = ["È¸¿ø°¡ÀÔ"];
			depth_bg = ["/imgs/general/title_840.gif"];
		}
		if (sub == 5) {
			depth_title = ["Ã¼Çè°ü"];
			depth_bg = ["/imgs/general/title_850.gif"];
		}
	}
}
