function SceneForgotPassword(options) {
	this.options = options;
    
    this.ForgotPasswordView=null;
    this.ForgotPasswordPopupView=null;
	this.ForgotPasswordDim=null;
    
    this.TitleBar = null;    
    this.Msg_1_Label = null;
    this.Msg_2_Label = null;
    
    this.OkBtn = null;
    
    this.ForgotPWDHelpBar = null;
    
    this.PopupTimer = false;
}

SceneForgotPassword.prototype.initialize = function () {
	alert("SceneForgotPassword.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();
}

SceneForgotPassword.prototype.handleShow = function () {
	alert("SceneForgotPassword.handleShow()");
	// this function will be called when the scene manager show this scene 
    this.ForgotPasswordDim.show();
	
    // this.startTimer();
    WndMgr.startPopupHideTimer(30000);
}

SceneForgotPassword.prototype.handleHide = function () {
	alert("SceneForgotPassword.handleHide()");
	// this function will be called when the scene manager hide this scene  
    this.ForgotPasswordDim.hide();
	
	WndMgr.stopPopupHideTimer();
    // if (this.PopupTimer ==true)
    // {
        // this.stopTimer();
    // }

}

SceneForgotPassword.prototype.handleFocus = function () {
	alert("SceneForgotPassword.handleFocus()");
	// this function will be called when the scene manager focus this scene
    
    this.highlight(this.OkBtn);
}

SceneForgotPassword.prototype.handleBlur = function () {
	alert("SceneForgotPassword.handleBlur()");
	// this function will be called when the scene manager move focus to another scene from this scene
	this.highlight(null);
}

SceneForgotPassword.prototype.handleKeyDown = function (keyCode) {
	alert("SceneForgotPassword.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:
			break;
		case sf.key.UP:

        break;
		case sf.key.DOWN:

			break;

		case sf.key.ENTER:
             this.processEnterKey();
			break;
            
        case sf.key.RETURN:
        case sf.key.EXIT:
            this.processReturnKey();
             //2013 modify by minseok
            sf.key.preventDefault();
            //sf.key.block(event);
			break;

        case 147:  //infolink
        case 261:  //contents
        case 115:  //wiselink
            ProcMgr.processInfolinkKey(); 
			break;
	}
}

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

SceneForgotPassword.prototype.create = function(){
    alert("SceneForgotPassword.create()");
    this.ForgotPasswordView = new View("ForgotPassword");
    // this.ForgotPasswordView.SetBgImage(g_Image.IMAGE_CHANGE_PASSWORD_BG);
	this.ForgotPasswordPopupView = new View("ForgotPasswordPopup");
	this.ForgotPasswordPopupView.CreatePopupBG(0,"ForgotPassword_popup_BG");
	this.ForgotPasswordPopupView.SetTitleTextofPopupBG(IDWS_MOIP_FORGOT_PASSWORD);
	
	this.ForgotPasswordDim = new DimBg("ForgotPasswordDim", "ForgotPassword"); 
    
    this.TitleBar = new Label(null,"forgot_password_title");
    this.TitleBar.SetTextStyle("forgot_password_title_style");
    this.TitleBar.SetText(IDWS_MOIP_FORGOT_PASSWORD);

    this.Msg_1_Label = new Label(null,"forgot_password_msg_1");
    this.Msg_1_Label.SetTextStyle("forgot_password_msg_style");
    this.Msg_1_Label.SetText(IDWS_MOIP_INFO_PASSWORD);
    
    this.Msg_2_Label = new Label(null,"forgot_password_msg_2");
    this.Msg_2_Label.SetTextStyle("forgot_password_msg_style");
    this.Msg_2_Label.SetText(IDWS_MOIP_PASSWORD_WEB_SITE);
    
    var this_ = sf.scene.get("ForgotPassword");
    var clickCF =  function(obj){this_.processClickEvent(obj);};
    
    this.OkBtn = new Button();
    this.OkBtn.SetImageObjId("forgot_password_ok_btn", 20);
    this.OkBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_POPUP_BTN_NORMAL);
    this.OkBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_POPUP_BTN_NORMALFOCUS);	
    this.OkBtn.SetTextObjId("forgot_password_ok_btn_text");
    this.OkBtn.SetText(SID_OK_KR_YES);
    this.OkBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE,"cPopup_btn_text");
	this.OkBtn.SetOnClickCallbackFunc(clickCF);

    
}

SceneForgotPassword.prototype.highlight=function(obj)
{
    this.ForgotPasswordView.setCurrenHighlight(obj);
}

SceneForgotPassword.prototype.processEnterKey = function(){
    alert("SceneForgotPassword.processEnterKey() ");
    
	StateMgr.Stop_Forgot_Pwd_State(true);
}


SceneForgotPassword.prototype.processReturnKey = function(){
    alert("SceneForgotPassword.processReturnKey() ");
    
	StateMgr.Stop_Forgot_Pwd_State(true);
}
SceneForgotPassword.prototype.processClickEvent = function(obj){
	alert("SceneForgotPassword.processClickEvent() ");
	
	this.processEnterKey();
}


