/*  ngb_gamegnb.js ¿¡ Æ÷ÇÔµÈ ÄÚµå·Î
    ÆË¾÷ µîÀÇ ³Ø½¼GNB¸¦ Æ÷ÇÔÇÏÁö ¾ÊÀº ÆäÀÌÁö¿¡¼­´Â 
    NgbCookie °³Ã¼¸¦ ¾òÁö ¸øÇØ ½ºÅ©¸³Æ® ¿À·ù ¹× ±â´ÉÀÌ µ¿ÀÛ ¾ÈÇÔÀ» ¸·±â À§ÇØ 
    ¾Æ·¡¿¡ ÄÚµå¸¦ º¹Á¦ÇÔ (³Ø½¼ °øÅë ¸ðµâ ¾÷±×·¹ÀÌµåµÇ´Â °æ¿ì ¾Æ·¡ ÄÚµåµµ ¸ÂÃçÁà¾ßÇÔ 
*/
if( location.href.toLowerCase().split( '://', 1 )[ 0 ] == 'https' ) {
	if( typeof( NxamlLib ) != 'object' )
		document.write( '<scr' + 'ipt src ="https://platform.nexon.com/ajax/npf_lib.js" type="text/javascript"></scr' + 'ipt>' );
	if( typeof( NgbLogin ) != 'object' )
		document.write("<scr" + "ipt src ='https://ssl.nx.com/s1/global/ngb_util.js' type='text/javascript' charset='euc-kr'></scr" + "ipt>");
}
else { 
	if( typeof( NxamlLib ) != 'object' )
		document.write( '<scr' + 'ipt src ="http://platform.nx.com/ajax/npf_lib.js" type="text/javascript"></scr' + 'ipt>' );
	if( typeof( NgbLogin ) != 'object' )
		document.write("<scr" + "ipt src ='http://js.nx.com/s1/global/ngb_util.js' type='text/javascript' charset='euc-kr'></scr" + "ipt>");
}

/* AOS ½ÇÇà */
$(function() {
    ExecuteAOS();
});

function ExecuteAOS() {
    NgbAOS.strKeyDefenseURL = '/C3/Common/AOS/setup_keydefense.html';
    NgbAOS.strFireWallURL = '/C3/Common/AOS/setup_firewall.html';
    NgbAOS.strDomain = "mabinogi.com";
    NgbAOS.Execute();
}

function GetLoginMKD() {
    // Å°º¸µå º¸¾ÈÀÌ ¼³Ä¡ ¾ÈµÇ¾î ÀÖÀ½ ¾È³» ÈÄ ¼³Ä¡ ÆäÀÌÁö·Î ÀÌµ¿
    if (!NgbAOS.CheckInstalled()) {
        if (confirm('¸¶ºñ³ë±â È¨ÆäÀÌÁö¿¡ ·Î±×ÀÎÀ» ÇÏ±â À§ÇØ¼­´Â\nÅ°º¸µå º¸¾È ¼Ö·ç¼ÇÀ» ¹Ýµå½Ã ¼³Ä¡ ÇÏ¼Å¾ß ÇÕ´Ï´Ù.\nÀÚ¼¼ÇÑ ¼³Ä¡ ¾È³» ÆäÀÌÁö·Î ÀÌµ¿ ÇÏ½Ã°Ú½À´Ï±î?')) {
            var url = "/c3/etc/guide_keyboard.asp";
            if (opener) {
                opener.location.href = url;
                window.close();
            }
            else {
                location.href = url;
            }
        }
        else {
            document.LoginForm.reset();
        }
    }
    
    // Å°º¸µå º¸¾ÈÀ» »ç¿ëÇÏµµ·Ï ¼³Á¤ ¾ÈµÇ¾î ÀÖÀ½ ½ÇÇàÇÏµµ·Ï °­Á¦
    if (NgbAOS.Util.GetKeyDefense() != "1") {
        NgbAOS.Util.SetKeyDefense(true);
        location.href = location.href;
    }
}