/***************************URL Information******************************************/
var __bLocal = (location.href.indexOf("http://lc") == 0);
var __bNewWWW = (location.href.indexOf("http://new") == 0);
var __urlPrefix = __bLocal ? "lc-" : (__bNewWWW ? "new-" : "");

var __urlWWW = "http://" + __urlPrefix + "www.webzen.com/";
var __urlMEMBER = "http://" + __urlPrefix + "member.webzen.com/";
var __urlFORUM = "http://" + __urlPrefix + "forum.webzen.com/";
var __urlMU = "http://" + __urlPrefix + "muonline.webzen.com/";
var __urlSUN = "http://" + __urlPrefix + "sunonline.webzen.com/";
var __urlARCHLORD = "http://" + __urlPrefix + "archlord.webzen.com/";
var __urlPayment = "http://" + __urlPrefix + "payment.webzen.com/";
/***************************URL Information******************************************/


var arrMenu = new Array();

arrMenu[0] = new Array();
arrMenu[0][0] = { Seq: 0, Text: MENU00, link: "/" };

arrMenu[1] = new Array();
arrMenu[1][0] = { Text: MENU10, link: "/Notice/" };
arrMenu[1][1] = { Text: MENU11, link: "/Notice/" };
arrMenu[1][2] = { Text: MENU12, link: "/Event/" };

arrMenu[2] = new Array();
arrMenu[2][0] = { Text: MENU20, link: "/Support/FAQ.aspx" };
arrMenu[2][1] = { Text: MENU21, link: "/Support/FAQ.aspx" };
arrMenu[2][2] = { Text: MENU22, link: "/_HTML/Policies.aspx" };
arrMenu[2][3] = { Text: MENU23, link: "/Support/QNA.aspx" };
arrMenu[2][4] = { Text: MENU24, link: "/_HTML/WCoinHelp.aspx" };

arrMenu[3] = new Array();
arrMenu[3][0] = { Text: MENU30, link: "/_HTML/PrivacyPolicy.aspx" };
arrMenu[3][1] = { Text: MENU31, link: "http://company.webzen.com/eng/" };
arrMenu[3][2] = { Text: MENU32, link: "/_HTML/PrivacyPolicy.aspx" };
arrMenu[3][3] = { Text: MENU33, link: "/_HTML/TermsOfService.aspx" };
//arrMenu[3][4] = {Text:"Contact us",link:"/_HTML/ContactUs.aspx"};

arrMenu[4] = new Array();
arrMenu[4][0] = { Text: MENU40, link: "/_HTML/Download.aspx" };

arrMenu[5] = new Array();
arrMenu[5][0] = { Text: MENU50, link: "/_HTML/RegistAccountTips.aspx" };

function printLeftMenu(intDepth1, intDepth2)
{
    document.write( "<div id=\"category\">")
    document.write( "	<ul>")
    
    for( var intLoop=1; intLoop < arrMenu[intDepth1].length; intLoop++ )
    {
        
        if(intDepth2 ==intLoop)
        {
            document.write( "<li onmouseover=\"category.over(this);\" class=\"on\"><a href=\""+arrMenu[intDepth1][intLoop].link+"\">"+arrMenu[intDepth1][intLoop].Text+"</a></li>")
        }
        else
        {
            document.write( "<li onmouseover=\"category.over(this);\"><a href=\""+arrMenu[intDepth1][intLoop].link+"\">"+arrMenu[intDepth1][intLoop].Text+"</a></li>")
        }
    }
    
    document.write( "	</ul>")
    document.write( "</div>")
}

function printHistory(intDepth1, intDepth2)
{
	document.write("<a href=\"/\">" + arrMenu[0][0].Text + "</a>")
	if (intDepth2 == 0)
	{
		document.write(" &gt; " + arrMenu[intDepth1][0].Text)
	}
	else
	{
		document.write(" &gt; <a href=\"" + arrMenu[intDepth1][0].link + "\">" + arrMenu[intDepth1][0].Text + "</a>")
	}

	for (var intLoop = 1; intLoop < arrMenu[intDepth1].length; intLoop++)
	{
		if (intDepth2 == intLoop)
		{
			document.write(" &gt; " + arrMenu[intDepth1][intLoop].Text)
		}
	}
}

var _naviLoginSts = false;
function setNavLoginSts(blnSts)
{
	_naviLoginSts = blnSts;
}

function getNavLoginSts()
{
	return _naviLoginSts;
}

var navigation = {
	action: function(dep1, dep2)
	{
		var link;
		switch (dep1)
		{
			case 1: link = this.gnb_games(dep2); break;
			case 2: link = this.gnb_news(dep2); break;
			case 3: link = this.gnb_forums(dep2); break;
			case 4: link = this.gnb_wcoin(dep2); break;
			case 5: link = this.gnb_download(dep2); break;
			default: link = "/";
		}
		if (!link) return;
		if (link.indexOf("window.open") > -1 || link.indexOf("javascript") > -1)
		{
			eval(link);
		} else
		{
			location.href = link;
		}
	},
	gnb_games: function(dep2)
	{
		this.gnb_games.url = [
			"", 		                                //0.games
			__urlMU, 	                            //1.muonline
			__urlARCHLORD, 				            //2.archload
			__urlSUN, 								//3.sunonline
			""							                //4.r2
		]
		if (dep2 <= this.gnb_games.url.length)
		{
			var url = this.gnb_games.url[dep2];
		}
		return url;
	},
	gnb_news: function(dep2)
	{
		this.gnb_news.url = [
			__urlWWW + "Notice/", 							//0.news
			__urlWWW + "Notice/", 							//1.notice
			__urlWWW + "Event/"									//2.events
		]
		if (dep2 <= this.gnb_news.url.length)
		{
			var url = this.gnb_news.url[dep2];
		}
		return url;
	},
	gnb_forums: function(dep2)
	{
		this.gnb_forums.url = [
			"" + __urlFORUM + "",                               //0.forums
			"" + __urlFORUM + "forum1-general.aspx",         //1.General
		    "" + __urlFORUM + "forum64-continent-of-mu.aspx",   //2.MU Online
		    "" + __urlFORUM + "forum73-archlord.aspx",         //3.archload
			"" + __urlFORUM + "forum114-sun.aspx",             //4.sunonline
			"" + __urlFORUM + "VideoForum/"					    //5.Video Forum
		]
		if (dep2 <= this.gnb_forums.url.length)
		{
			var url = this.gnb_forums.url[dep2];
		}
		return url;
	},
	gnb_wcoin: function(dep2)
	{
		if (getNavLoginSts())
		{
			this.gnb_wcoin.url = [
				"" + __urlPayment + "Main/Main_GB_C.asp",                                                               //0.W COIN
				"" + __urlPayment + "Main/Main_GB_C.asp",                                                             //1.Buy W COIN
				"" + __urlPayment + "Main/Main_GB_C.asp?AccessUrl=" + __urlPayment + "Coupon/CouponRegisterFrm.asp",     //2.Redeem Coupon
				"" + __urlPayment + "Main/Main_GB_C.asp?AccessUrl=" + __urlPayment + "MyPage/WCoin/WCoinChargeListFrm.asp", //3.My W Coin History
				"" + __urlPayment + "Main/Main_GB_C.asp?AccessUrl=" + __urlPayment + "MyPage/WPoint/WPointMainFrm.asp"	    //4.My W Point History
			]
		}
		else
		{
			this.gnb_wcoin.url = [
				"" + __urlMEMBER + "Login/default.aspx?sGC=102&sRU=" + __urlPayment + "Main/Main_GB_C.asp",                                                                 //0.W COIN
				"" + __urlMEMBER + "Login/default.aspx?sGC=102&sRU=" + __urlPayment + "Main/Main_GB_C.asp",                                                                 //1.Buy W COIN
				"" + __urlMEMBER + "Login/default.aspx?sGC=102&sRU=" + __urlPayment + "Main/Main_GB_C.asp?AccessUrl=" + __urlPayment + "Coupon/CouponRegisterFrm.asp",         //2.Redeem Coupon
				"" + __urlMEMBER + "Login/default.aspx?sGC=102&sRU=" + __urlPayment + "Main/Main_GB_C.asp?AccessUrl=" + __urlPayment + "MyPage/WCoin/WCoinChargeListFrm.asp", //3.My W Coin History
				"" + __urlMEMBER + "Login/default.aspx?sGC=102&sRU=" + __urlPayment + "Main/Main_GB_C.asp?AccessUrl=" + __urlPayment + "MyPage/WPoint/WPointMainFrm.asp"	    //4.My W Point History
			]
		}
		if (dep2 <= this.gnb_wcoin.url.length)
		{
			var url = this.gnb_wcoin.url[dep2];
		}
		return url;
	},
	gnb_download: function(dep2)
	{
		this.gnb_download.url = [
			__urlWWW + "_HTML/Download.aspx", 									//0.download
		]
		if (dep2 <= this.gnb_download.url.length)
		{
			var url = this.gnb_download.url[dep2];
		}
		return url;
	}
}