
function SceneCreateAccountStep1(options) {
	this.options = options;
	
	this.InitFlag = true;
	this.destroyFlag = true;
	
	this.MainView=null;
	
	this.TitleLabel = null;
	
/*	this.ProgressBarBgLabel = null;
	this.ProgressBarCurrentLabel = null;
	*/
	//2013 add by minseok
	this.Nevi_icon1 = null;
	this.Nevi_icon2 = null;
	this.Nevi_icon3 = null;
	this.Nevi_icon4 = null;
	
	this.SkypeNameLabel = null;
	this.PasswordLabel = null;
	
	this.SkypeNameInfoLabel = null;
	this.PasswordInfoLabel = null;
	
	this.SkypeNameBtn = null;
	this.PasswordBtn = null;

	this.SkypeNameVerifyLabel = null;
	this.PasswordVerifyLabel = null;
	
	this.FlagSkypeNameCheck= false;
	this.FlagPasswordCheck= false;
	
	this.RemeberPasswordCheckBox = null;
	
	this.PreviousBtn = null;
	this.NextBtn = null;
	
	this.DefaultHelpBar =null;
	this.InputHelpBar =null;
	
	this.PWD_Info_String = "";    
}

SceneCreateAccountStep1.prototype.initialize = function () {
	alert("SceneCreateAccountStep1.initialize()");
	// this function will be called only once when the scene manager show this scene first time
	// initialize the scene controls and styles, and initialize your variables here 
	// scene HTML and CSS will be loaded before this function is called
   
    this.create();
}

SceneCreateAccountStep1.prototype.handleShow = function () {
	alert("SceneCreateAccountStep1.handleShow()");
	// this function will be called when the scene manager show this scene 

	if(this.InitFlag == true){
	
	    this.initCreateAccount();
	}
        
}

SceneCreateAccountStep1.prototype.handleHide = function () {
	alert("SceneCreateAccountStep1.handleHide()");
	// this function will be called when the scene manager hide this scene  

}

SceneCreateAccountStep1.prototype.handleFocus = function () {
	alert("SceneCreateAccountStep1.handleFocus()");
	// this function will be called when the scene manager focus this scene
    var currentHighlight =  this.MainView.getCurrentHighlight();
    if(currentHighlight ==null)
    {
        this.highlight(this.SkypeNameBtn);
    }
    else
    {
         this.highlight(currentHighlight);
    }
  
	var this_ = sf.scene.get("CreateAccountStep1");
  	var returnCF =  function(){this_.processReturnKey();};
    WndMgr.SetReturnIconClickCallback(returnCF);
}

SceneCreateAccountStep1.prototype.handleBlur = function () {
	alert("SceneCreateAccountStep1.handleBlur()");
	// this function will be called when the scene manager move focus to another scene from this scene
    var currentHighlight =  this.MainView.getCurrentHighlight();
    currentHighlight.blur();
    
    WndMgr.SetReturnIconClickCallback(null);

}

SceneCreateAccountStep1.prototype.handleKeyDown = function (keyCode) {
	alert("SceneCreateAccountStep1.handleKeyDown(" + keyCode + ")");
	// TODO : write an key event handler when this scene get focued
	PluginAPIMgr.PlayAudio(keyCode);
	if(ProcMgr.checkWidgetHighlight()==false){
		return;
	}
	switch (keyCode) {
		case sf.key.LEFT:
		case sf.key.RIGHT:
           	this.processLeftRightKey(keyCode);
			break;
		case sf.key.UP:
            this.processUpKey();
			break;
		case sf.key.DOWN:
            this.processDownKey();
			break;

		case sf.key.ENTER:
            this.processEnterKey();
			break;
            
        case sf.key.RETURN:
            this.processReturnKey();
            //2013 modify by minseok
            sf.key.preventDefault();
            //sf.key.block(event);
			break;
            
        case sf.key.EXIT:
            this.processExitKey();
            //2013 modify by minseok
            sf.key.preventDefault();
            //sf.key.block(event);
			break;
        case 147:  //infolink
        case 261:  //contents
        case 115:  //wiselink
            ProcMgr.processInfolinkKey(); 
			break;
        
		default:
            ProcMgr.processBlockKey(keyCode);
            break;

	}
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////

SceneCreateAccountStep1.prototype.create = function(){
    alert("SceneCreateAccountStep1.create()");
    this.MainView = new View("CreateAccountStep1");
    // this.MainView.SetBgImage(g_Image.IMAGE_CREATE_ACCOUNT_BG);
  
	this.Nevi_icon1 = new Label("create_account_step1_nevi1",null);
	this.Nevi_icon1.SetBgImage(g_Image.IMAGE_CREATE_ACCOUNT_NEVI_HIGHLIGHT);
	this.Nevi_icon2 = new Label("create_account_step1_nevi2",null);
	this.Nevi_icon2.SetBgImage(g_Image.IMAGE_CREATE_ACCOUNT_NEVI_NORMAL);
	this.Nevi_icon3 = new Label("create_account_step1_nevi3",null);
	this.Nevi_icon3.SetBgImage(g_Image.IMAGE_CREATE_ACCOUNT_NEVI_NORMAL);
	this.Nevi_icon4 = new Label("create_account_step1_nevi4",null);
	this.Nevi_icon4.SetBgImage(g_Image.IMAGE_CREATE_ACCOUNT_NEVI_NORMAL);
	
  
	this.TitleLabel = new Label(null,"create_account_step1_title");
    this.TitleLabel.SetTextStyle("create_account_title_style");
    this.TitleLabel.SetText(TV_SID_CREATE_AN_ACCOUNT);

    this.SkypeNameLabel = new Label(null,"create_account_step1_skype_name");
    this.SkypeNameLabel.SetTextStyle("create_account_text_style");
    this.SkypeNameLabel.SetText(TV_SID_CREATE_SKYPE_NAME);

    this.PasswordLabel = new Label(null,"create_account_step1_password");
    this.PasswordLabel.SetTextStyle("create_account_text_style");
    this.PasswordLabel.SetText(SID_PASSWORD);
	var this_ = sf.scene.get("CreateAccountStep1");
	var clickCF =  function(obj){this_.processClickEvent(obj);};
	var overCF =  function(obj){this_.processMouseOverEvent(obj);};
	
	this.SkypeNameBtn= new Button();
    this.SkypeNameBtn.SetImageObjId("create_account_step1_skype_name_btn", 30);
    this.SkypeNameBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_CREATE_ACCOUNT_BTN_NORMAL);
    this.SkypeNameBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_CREATE_ACCOUNT_BTN_NORMALFOCUS);
    this.SkypeNameBtn.SetTextObjId("create_account_step1_skype_name_btn_text");
    this.SkypeNameBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE,"create_account_input_btn_style");
    this.SkypeNameBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE,"create_account_input_btn_select_style");
    this.SkypeNameBtn.SetMaxStringLength(32);
    this.SkypeNameBtn.SetMinStringLength(6);
    this.SkypeNameBtn.SetIsPlainText(true);
    this.SkypeNameBtn.SetFlagBlockSpace(true);
	this.SkypeNameBtn.SetFlagIdType(true);
   	this.SkypeNameBtn.SetOnTextChangeFunc(function(){ this_.invalidSkypeName();});
    //this.SkypeNameBtn.SetHelpText(IDWS_MOIP_PRESS_ENTER, "create_account_input_btn_help_style");
    this.SkypeNameBtn.SetTextEditorInfo(TV_SID_CREATE_SKYPE_NAME, TV_SID_CREATE_SKYPE_NAME);
	this.SkypeNameBtn.SetOnClickCallbackFunc(clickCF);
	this.SkypeNameBtn.SetOnMouseOverCallbackFunc(overCF);
	
    this.PasswordBtn= new Button();
    this.PasswordBtn.SetImageObjId("create_account_step1_password_btn", 30);
    this.PasswordBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_CREATE_ACCOUNT_BTN_NORMAL);
    this.PasswordBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_CREATE_ACCOUNT_BTN_NORMALFOCUS);
    this.PasswordBtn.SetTextObjId("create_account_step1_password_btn_text", true);
    this.PasswordBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE,"create_account_input_btn_style");
    this.PasswordBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE,"create_account_input_btn_select_style");
    this.PasswordBtn.SetMaxStringLength(20);
    this.PasswordBtn.SetMinStringLength(6);
    this.PasswordBtn.SetIsPlainText(true);
  	this.PasswordBtn.SetOnTextChangeFunc(function(){ this_.invalidPassword();});
    //this.PasswordBtn.SetHelpText(IDWS_MOIP_PRESS_ENTER, "create_account_input_btn_help_style");
    this.PasswordBtn.SetTextEditorInfo(SID_PASSWORD, SID_PASSWORD);
    this.PasswordBtn.SetOnClickCallbackFunc(clickCF);
    this.PasswordBtn.SetOnMouseOverCallbackFunc(overCF);

    this.SkypeNameVerifyLabel = new Label(null,"create_account_step1_skype_name_verify_msg");
    this.SkypeNameVerifyLabel.SetTextStyle("create_account_verify_msg_style");
    this.SkypeNameVerifyLabel.SetText("");

    this.PasswordVerifyLabel = new Label(null,"create_account_step1_password_verify_msg");
    this.PasswordVerifyLabel.SetTextStyle("create_account_verify_msg_style");
    this.PasswordVerifyLabel.SetText("");
	this.PWD_Info_String = TV_SID_6_20_CHARACTERS_NEEDED + "("+TV_SID_MINIMUM_1_LETTER_AND_1_NUMBER+")";

    this.RemeberPasswordCheckBox=new CheckBox();
    this.RemeberPasswordCheckBox.SetImageObjId("create_account_step1_remember_password_check_box");
    this.RemeberPasswordCheckBox.SetBgImage(CBoxImgIndex.CB_NORMAL_IMG,  g_Image.IMAGE_CREATE_ACCOUNT_CHECK_BOX_NORMAL);
    this.RemeberPasswordCheckBox.SetBgImage(CBoxImgIndex.CB_NORMAL_FOCUS_IMG,  g_Image.IMAGE_CREATE_ACCOUNT_CHECK_BOX_NORMALFOCUS);
    this.RemeberPasswordCheckBox.SetTextObjId("create_account_step1_remember_password_check_box_text");
    this.RemeberPasswordCheckBox.SetText(TV_SID_REMEMBER_MY_PASSWORD_KR_SAVE);
    this.RemeberPasswordCheckBox.SetTextStyle("create_account_check_box_style");
    this.RemeberPasswordCheckBox.AppendFgImage("create_account_step1_remember_password_check_box_selected_icon","0px","0px","29px","29px");
    this.RemeberPasswordCheckBox.SetFgImage(g_Image.IMAGE_CREATE_ACCOUNT_CHECK_BOX_SELECTED); 
    this.RemeberPasswordCheckBox.SetFlagSelect(true);
    this.RemeberPasswordCheckBox.SetOnClickCallbackFunc(clickCF);
    this.RemeberPasswordCheckBox.SetOnMouseOverCallbackFunc(overCF);

    this.PreviousBtn= new Button();
    this.PreviousBtn.SetImageObjId("create_account_step1_previous_btn",30);
    this.PreviousBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_CREATE_ACCOUNT_PREVIOUS_BTN_NORMAL);
    this.PreviousBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_CREATE_ACCOUNT_PREVIOUS_BTN_NORMALFOCUS);
    this.PreviousBtn.SetBgImage(BtnImgIndex.BTN_DIM_IMG, g_Image.IMAGE_CREATE_ACCOUNT_PREVIOUS_BTN_NORMAL);
    this.PreviousBtn.SetTextObjId("create_account_step1_previous_btn_text");
    this.PreviousBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE,"create_account_btn_normal_style");
	this.PreviousBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE,"create_account_btn_select_style");
    this.PreviousBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_DIM_STYLE,"create_account_btn_dim_style");
    this.PreviousBtn.SetText(SID_CANCEL);
    this.PreviousBtn.SetOnClickCallbackFunc(clickCF);
    this.PreviousBtn.SetOnMouseOverCallbackFunc(overCF);
	
	this.NextBtn= new Button();
    this.NextBtn.SetImageObjId("create_account_step1_next_btn",30);
    this.NextBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_CREATE_ACCOUNT_NEXT_BTN_NORMAL);
    this.NextBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_CREATE_ACCOUNT_NEXT_BTN_NORMALFOCUS);
    this.NextBtn.SetBgImage(BtnImgIndex.BTN_DIM_IMG, g_Image.IMAGE_CREATE_ACCOUNT_NEXT_BTN_DIM);
    this.NextBtn.SetTextObjId("create_account_step1_next_btn_text");
    this.NextBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE,"create_account_btn_normal_style");
	this.NextBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE,"create_account_btn_select_style");
    this.NextBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_DIM_STYLE,"create_account_btn_dim_style");
    this.NextBtn.SetText(SID_NEXT);
    this.NextBtn.SetOnClickCallbackFunc(clickCF);
    this.NextBtn.SetOnMouseOverCallbackFunc(overCF);
}

SceneCreateAccountStep1.prototype.setInitFlag= function(init_flag){
     this.InitFlag = init_flag;
}

SceneCreateAccountStep1.prototype.setDestroyFlag= function(destroy_flag){
     this.destroyFlag = destroy_flag;
}

SceneCreateAccountStep1.prototype.initCreateAccount = function()
{
	
	this.SkypeNameBtn.SetText("");
	this.PasswordBtn.SetText("");
	
	var is_auto_signin = PluginAPIMgr.IsAutoSignInSet();
	this.RemeberPasswordCheckBox.SetFlagSelect(is_auto_signin);
	
	this.FlagSkypeNameCheck= false;
	this.FlagPasswordCheck= false;
	
	this.SkypeNameVerifyLabel.SetText(TV_SID_6_32_CHARACTERS_NEEDED);
	this.PasswordVerifyLabel.SetText(this.PWD_Info_String);
	
	this.highlight(null);
	this.InitFlag = false;
	
	if(this.destroyFlag == true)
	{
		this.destroyFlag= false;
	}
	//test_modify by minseok
	this.NextBtn.SetFlagDim(true);
	// this.SkypeNameBtn.SetText("qqqqqq");
	// this.PasswordBtn.SetText("q11111");
}

SceneCreateAccountStep1.prototype.updateSkypeName = function(suggested_SkypeName)
{
	alert("SceneCreateAccountStep1.updateSkypeName() : "+ suggested_SkypeName);
	this.SkypeNameBtn.SetText(suggested_SkypeName);
}

SceneCreateAccountStep1.prototype.startTextInput = function(){
    alert("SceneCreateAccountStep1.startTextInput() ");
    
    var currentHighlight =  this.MainView.getCurrentHighlight();
    
    switch(currentHighlight)
    {
        case this.SkypeNameBtn:
        case this.PasswordBtn:
        
             WndMgr.StartTextEditor(currentHighlight, "CreateAccountStep1", null);
            break;           
    }    
}

SceneCreateAccountStep1.prototype.toggleRemeberPasswordCheckBox = function(){
    alert("SceneCreateAccountStep1.toggleRemeberPasswordCheckBox() ");
    
    PluginAPIMgr.SetAutoSignIn(this.RemeberPasswordCheckBox.GetFlagSelect());
}

SceneCreateAccountStep1.prototype.goNextStep = function(){
    alert("SceneCreateAccountStep1.goNextStep() ");
	g_Data.SetCreateAccountStep1InputInfo(this.SkypeNameBtn.GetText(), this.PasswordBtn.GetText(), this.RemeberPasswordCheckBox.GetFlagSelect());
	WndMgr.NextStepCreateAccount();
}

SceneCreateAccountStep1.prototype.highlight=function(obj)
{
	alert("SceneCreateAccountStep1.highlight()");
	
    this.MainView.setCurrenHighlight(obj);
}

SceneCreateAccountStep1.prototype.select=function(obj)
{
	alert("SceneCreateAccountStep1.select()");
	
     this.MainView.setCurrentSelect(obj);
}


SceneCreateAccountStep1.prototype.processDownKey = function(){
    alert("SceneCreateAccountStep1.processDownKey() ");
    var currentHighlight =  this.MainView.getCurrentHighlight();
    
	switch(currentHighlight)
	{
		case this.SkypeNameBtn:
			 this.highlight(this.PasswordBtn);
			break;
		
		case this.PasswordBtn:
			 this.highlight(this.RemeberPasswordCheckBox);
			break;
			
		case this.RemeberPasswordCheckBox:
			if(this.NextBtn.GetFlagDim()==false)
			{
				this.highlight(this.NextBtn);
			}
			else
			{
				this.highlight(this.PreviousBtn);
			}
			 
			break;
			
		case this.PreviousBtn:	
		case this.NextBtn:
			 //this.highlight(this.SkypeNameBtn);
			break;
	}
}

SceneCreateAccountStep1.prototype.processUpKey = function(){
    alert("SceneCreateAccountStep1.processUpKey() ");
    
    var currentHighlight =  this.MainView.getCurrentHighlight();
    
	switch(currentHighlight)
	{
		case this.SkypeNameBtn:
			 
			break;
		
		case this.PasswordBtn:
			 this.highlight(this.SkypeNameBtn);
			break;
			
		case this.RemeberPasswordCheckBox:
			 this.highlight(this.PasswordBtn);
			break;
			
		case this.PreviousBtn:	
		case this.NextBtn:
			 this.highlight(this.RemeberPasswordCheckBox);
			break;
	}
}

SceneCreateAccountStep1.prototype.processLeftRightKey = function(keyCode){
    alert("SceneCreateAccountStep1.processLeftRightKey() ");
    
    var currentHighlight =  this.MainView.getCurrentHighlight();
    
	switch(currentHighlight)
	{		
		case this.PreviousBtn:
			alert("this.NextBtn.GetFlagDim() : "+this.NextBtn.GetFlagDim());
			if(keyCode==sf.key.RIGHT && this.NextBtn.GetFlagDim()==false)
			{
				this.highlight(this.NextBtn);
			}				 
			break;
			
		case this.NextBtn:
			if(keyCode==sf.key.LEFT){
				this.highlight(this.PreviousBtn);
			 }
			break;
	}
}

SceneCreateAccountStep1.prototype.processEnterKey = function(){
    alert("SceneCreateAccountStep1.processEnterKey() ");
    
    var currentHighlight = this.MainView.getCurrentHighlight();
    
    this.select(currentHighlight);
	
		switch(currentHighlight)
	{
		case this.SkypeNameBtn:
		case this.PasswordBtn:
			 this.startTextInput();
			break;
			
		case this.RemeberPasswordCheckBox:
			 this.toggleRemeberPasswordCheckBox();
			break;
			
		case this.PreviousBtn:	
			 this.processReturnKey();
			break;
			
		case this.NextBtn:
			 this.goNextStep();
			break;	
	}
}

SceneCreateAccountStep1.prototype.processReturnKey = function(){
    alert("SceneCreateAccountStep1.processReturnKey() ");
    
    StateMgr.Start_Welcome_State();
}

SceneCreateAccountStep1.prototype.processExitKey = function(){
    alert("SceneCreateAccountStep1.processExitKey() ");
   
   ProcMgr.ExitWithSignIn();
}


SceneCreateAccountStep1.prototype.invalidSkypeName = function(){
    alert("SceneCreateAccountStep1.invalidSkypeName() ");
    alert("SceneCreateAccountStep1.invalidSkypeName() initFlag : "+this.InitFlag);
    //alert("SceneCreateAccountStep1.invalidSkypeName() flagDim : "+this.NextBtn.GetFlagDim() );
	
    if(this.InitFlag ==true)
    {
        return;
    }
    
    var SkypeNameinputText = this.SkypeNameBtn.GetText();
   	alert("SceneCreateAccountStep1.invalidSkypeName() : skype name : "+SkypeNameinputText);
    this.FlagSkypeNameCheck= false;
	
	
    
    if(SkypeNameinputText.length ==0)
    {
        this.SkypeNameVerifyLabel.SetText(TV_SID_6_32_CHARACTERS_NEEDED);
    }
    else
	{
		var normalize_result = PluginAPIMgr.NormalizeIdentityForNewAccount(SkypeNameinputText);
		var STX = String.fromCharCode(2);
		var ETX = String.fromCharCode(3);
		var splitter = ETX + STX;
		
		var Result = normalize_result.split(splitter);
		
		if(parseInt(Result[0]) == ENUM_NORMALIZERESULT.IDENTITY_OK)
		{
			 var PWDInputText = this.PasswordBtn.GetText();
			 if(PWDInputText.length > 0 && this.FlagPasswordCheck== true)
			 {
			 	var result = PluginAPIMgr.ValidatePasswd(SkypeNameinputText,PWDInputText);
				if(result == ENUM_PWD_VALIDATERESULT.SAME_AS_USERNAME)
			    {
			        this.SkypeNameVerifyLabel.SetText(TV_SID_PASSWORD_IS_TOO_SIMILAR_TO_SKYPE_NAME);
			    }
				else
				{
					this.SkypeNameVerifyLabel.SetText("");
			        this.FlagSkypeNameCheck= true;
			
			        this.highlight(this.PasswordBtn);
				}
			 }
			 else
			 {
			 	 this.SkypeNameVerifyLabel.SetText("");
		         this.FlagSkypeNameCheck= true;
		
		         this.highlight(this.PasswordBtn);
			 }
		}
		else if(parseInt(Result[0]) == ENUM_NORMALIZERESULT.IDENTITY_EMPTY)
	    {
	        this.SkypeNameVerifyLabel.SetText(TV_SID_6_32_CHARACTERS_NEEDED);
	    }
		else if(parseInt(Result[0]) == ENUM_NORMALIZERESULT.SKYPENAME_SHORTER_THAN_6_CHARS)
	    {
	        this.SkypeNameVerifyLabel.SetText(TV_SID_TOO_SHORT_6_CHARACTERS_MIN);
	    }
		else if(parseInt(Result[0]) == ENUM_NORMALIZERESULT.IDENTITY_TOO_LONG)
	    {
	        this.SkypeNameVerifyLabel.SetText(TV_SID_6_32_CHARACTERS_NEEDED);
	    }
		else if(parseInt(Result[0]) == ENUM_NORMALIZERESULT.SKYPENAME_STARTS_WITH_NONALPHA)
	    {
	        this.SkypeNameVerifyLabel.SetText(TV_SKYPE_USERNAME_START_ALPHABETIC_MSG);
	    }
		else if(parseInt(Result[0]) == ENUM_NORMALIZERESULT.IDENTITY_CONTAINS_INVALID_CHAR)
		{
			this.SkypeNameVerifyLabel.SetText(TV_THE_SKYPE_USERNAME_HAS_INVALID_CHARACTERS);
		}
	    else
	    {
			this.SkypeNameVerifyLabel.SetText(IDWS_MOIP_LOGIN_FAIL_INVALID_SKYPENAME);
	    }
	}    
   this.checkNextBtnEnable();
}


SceneCreateAccountStep1.prototype.invalidPassword = function(){
    alert("SceneCreateAccountStep1.invalidPassword() ");
    alert("SceneCreateAccountStep1.invalidPassword() initFlag : "+this.InitFlag);
     if(this.InitFlag ==true)
    {
        return;
    }
    
    var PWDInputText = this.PasswordBtn.GetText();

    this.FlagPasswordCheck= false;

    if(PWDInputText.length ==0)
    {
		this.PasswordVerifyLabel.SetText(this.PWD_Info_String);
    }
	
	else
	{
		var SkypeNameinputText = this.SkypeNameBtn.GetText();
		if(SkypeNameinputText.length==0)
		{
			var result = PluginAPIMgr.ValidatePasswdWithoutID(PWDInputText);
		}
		else
		{
			var result = PluginAPIMgr.ValidatePasswd(SkypeNameinputText,PWDInputText);
		}
				
		if(result == ENUM_PWD_VALIDATERESULT.INVALID_PWD_NOT_VALIDATED)
	    {
	        this.PasswordVerifyLabel.SetText(IDWS_MOIP_NEW_PASS_INVALID);
	    }
		else if(result == ENUM_PWD_VALIDATERESULT.TOO_SHORT)
	    {
	        this.PasswordVerifyLabel.SetText(TV_SID_TOO_SHORT_6_CHARACTERS_MIN);
	    }
	    else if(result == ENUM_PWD_VALIDATERESULT.TOO_LONG)
	    {
	        //this.PasswordVerifyLabel.SetText(TV_SID_TOO_LONG_20_CHARACTERS_MAX);
	        this.PasswordVerifyLabel.SetText(IDWS_MOIP_NEW_PASS_INVALID);
	    }
		else if(result == ENUM_PWD_VALIDATERESULT.CONTAINS_INVALID_CHAR)
	    {
	        this.PasswordVerifyLabel.SetText(IDWS_MOIP_PASSWORD_INVALID_CHARACTERS);
	    }
		else if(result == ENUM_PWD_VALIDATERESULT.CONTAINS_SPACE)
	    {
	        this.PasswordVerifyLabel.SetText(IDWS_MOIP_PASSWORD_CONTAINS_SPACE);
	    }
		else if(result == ENUM_PWD_VALIDATERESULT.SAME_AS_USERNAME)
	    {
	        this.PasswordVerifyLabel.SetText(TV_SID_PASSWORD_IS_TOO_SIMILAR_TO_SKYPE_NAME);
	    }
		else if(result == ENUM_PWD_VALIDATERESULT.INVALID_FORMAT)
	    {
	        this.PasswordVerifyLabel.SetText(IDWS_MOIP_NEW_PASS_INVALID);
	    }
		else if(result == ENUM_PWD_VALIDATERESULT.CONTAINS_INVALID_WORD)
	    {
	        this.PasswordVerifyLabel.SetText(IDWS_MOIP_PWD_CONTAIN_INVALID_WORD);
	    }
		else if(result == ENUM_PWD_VALIDATERESULT.TOO_SIMPLE)
	    {
	        this.PasswordVerifyLabel.SetText(TV_SID_USE_AT_LEAST_1LETTER_AND_1NUMBER);
	    }
	    else
	    {
	        this.PasswordVerifyLabel.SetText("");
			this.FlagPasswordCheck= true;  
			
			
	    }
	}
    
    this.checkNextBtnEnable();
			//2013 modify by minseok
	if(this.NextBtn.GetFlagDim()==false){
			this.highlight(this.NextBtn);      
	    }
    
}

SceneCreateAccountStep1.prototype.checkNextBtnEnable = function(){

    if(this.FlagSkypeNameCheck== true && this.FlagPasswordCheck==true )
    {
         alert("SceneCreateAccountStep1.checkNextBtnEnable()  : false");
        this.NextBtn.SetFlagDim(false);
    }
    else
    {
        alert("SceneCreateAccountStep1.checkNextBtnEnable()  : true");
        this.NextBtn.SetFlagDim(true);       
    }
}


///////// Processing Click evnet  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////

SceneCreateAccountStep1.prototype.processClickEvent = function(obj){
	alert("SceneCreateAccountStep1.processClickEvent() ");
	
	
	this.processEnterKey();
}
SceneCreateAccountStep1.prototype.processMouseOverEvent = function(obj){
	alert("SceneCreateAccountStep1.processMouseOverEvent() ");
	
	var currentHighlight =  this.MainView.getCurrentHighlight();
    if(currentHighlight != obj)
    {
    	this.highlight(obj);
    }
	
	//this.processEnterKey();
}




