function _Login()
{
	this.isProcessing = false;
	
	this.submitLogin = function( strNexonID, strPassword, nStartTick, codeRegSite )
	{
		if ( this.isProcessing )
		{
			alert( "·Î±×ÀÎ ÇÏ´Â ÁßÀÔ´Ï´Ù. Àá½Ã¸¸ ±â´Ù·ÁÁÖ¼¼¿ä." );
			return false;
		}
		this.isProcessing = true;
		
		if( strNexonID == "" )
		{
			alert( "¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä" );
			this.isProcessing = false;
		}
		else if( strPassword == "" )
		{
			alert( "ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä" );
			this.isProcessing = false;
		}
		else
		{
			addChildForSubform( "strNexonID",strNexonID );
			addChildForSubform( "strPassword", strPassword );
			addChildForSubform( "codeRegSite", codeRegSite );
			submitForSubform( "https://login.nexon.com/login/page/loginproc.aspx");
		}
	}

	this.doLogin = function( strNexonID, strPassword, codeRegSite )
	{
		if ( typeof( codeRegSite ) == 'undefined' )
			codeRegSite = 0;
			
		if( strNexonID == "" )
		{
			alert( "¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä" );
		}
		else if( strPassword == "" )
		{
			alert( "ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä" );
		}
		else
		{
			EVM.addCommand( EVM.k_nEventType_onPageEnd, EVM.k_nPriority_normal, new EVMDelegator( Login.submitLogin ), strNexonID, strPassword, +( new Date() ), codeRegSite );
		}
	}
}

var Login = new _Login();

function submitLoginMes( strNexonID, strPassword )
{
	Login.doLogin( strNexonID, strPassword );
}

function submitDirectLogin( strNexonID, strPassword )
{
	addChildForSubform( "strNexonID",strNexonID );
	addChildForSubform( "strPassword", strPassword );
	submitForSubform( "https://login.nexon.com/login/page/loginproc.aspx");
}