function SceneFaceRecogNotRegisteredPopup(options) {
	this.options = options;
    
    this.MainView=null;
    this.MainViewBG=null;
	this.MainViewDim=null;
    
    this.PopupMsg = null;
    
    this.OkBtn = null;
    
   
    this.CloseTimer = false;

}

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

SceneFaceRecogNotRegisteredPopup.prototype.handleShow = function () {
	alert("SceneFaceRecogNotRegisteredPopup.handleShow()");
	// this function will be called when the scene manager show this scene 
	this.MainViewDim.show();
	
    this.highlight(this.OkBtn);
	WndMgr.startPopupHideTimer(10000, function(){sf.scene.get('FaceRecogNotRegisteredPopup').popupTimerCallback();});
    //this.startTimer();
    
}

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

	this.MainViewDim.hide();
	
	/*if(this.CloseTimer== true)
	{
		this.stopTimer();
	}*/
}

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

}

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

SceneFaceRecogNotRegisteredPopup.prototype.handleKeyDown = function (keyCode) {
	alert("SceneFaceRecogNotRegisteredPopup.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:
			break;
		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();
            sf.key.preventDefault();
			break;
            
         case 147:  //infolink
         case 261:  //contents
         case 115:  //wiselink
            ProcMgr.processInfolinkKey(); 
			break;
	}
}

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

SceneFaceRecogNotRegisteredPopup.prototype.create = function(){
    alert("SceneFaceRecogNotRegisteredPopup.create()");
    
    this.MainView = new View("FaceRecogNotRegisteredPopup");
	this.MainViewDim = new DimBg("FaceRecogNotRegisteredPopupDim", "FaceRecogNotRegisteredPopup");   
    this.MainViewBG = new View("FaceRecogNotRegisteredPopupBG");
	this.MainViewBG.CreatePopupBG(1,"FaceRecogNotRegisteredPopup_popup_BG") 
    
    this.PopupMsg = new Label(null,"face_recog_not_registered_popup_msg");
    this.PopupMsg.SetTextStyle("face_recog_not_registered_popup_msg_style");
    this.PopupMsg.SetText(TV_FACE_NOT_REGCOGNIZED);
    
    var this_ = sf.scene.get("FaceRecogNotRegisteredPopup");
    var clickCF =  function(obj){this_.processClickEvent(obj);};
	
	this.OkBtn = new Button();
    this.OkBtn.SetImageObjId("face_recog_not_registered_popup_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("face_recog_not_registered_popup_ok_btn_text");
    this.OkBtn.SetText(SID_OK);
    this.OkBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE,"cPopup_btn_text");
    this.OkBtn.SetOnClickCallbackFunc(clickCF);     
	
    
}


SceneFaceRecogNotRegisteredPopup.prototype.highlight=function(obj)
{
    this.MainView.setCurrenHighlight(obj);

}


SceneFaceRecogNotRegisteredPopup.prototype.popupTimerCallback = function()
{
    alert("SceneFaceRecogNotRegisteredPopup.popupTimerCallback() ");
	
	/*if (this.CloseTimer == false)
	{
		return;
	}
	this.CloseTimer = false;	*/
		
   WndMgr.BackStepFaceRecogSignin(); 
}

SceneFaceRecogNotRegisteredPopup.prototype.processLeftKey = function(){
    alert("SceneFaceRecogNotRegisteredPopup.processLeftKey() ");
    
}

SceneFaceRecogNotRegisteredPopup.prototype.processRightKey = function(){
    alert("SceneFaceRecogNotRegisteredPopup.processRightKey() ");
    
}

SceneFaceRecogNotRegisteredPopup.prototype.processEnterKey = function(){
    alert("SceneFaceRecogNotRegisteredPopup.processEnterKey() ");
    
    var currentHighlight =  this.MainView.getCurrentHighlight();
    
    switch(currentHighlight)
    {
        case this.OkBtn:
			WndMgr.BackStepFaceRecogSignin(); 
            break;
            
    }
}

SceneFaceRecogNotRegisteredPopup.prototype.processReturnKey = function(){
    alert("SceneFaceRecogNotRegisteredPopup.processReturnKey() ");
	
    WndMgr.BackStepFaceRecogSignin();  
}

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

