function SceneminiCannotCallInDualView(options) {
	this.options = options;
	
	this.MainView = null;
	this.StatusBtn 	= null;
	this.SignOutBtn 	= null;
	this.MsgLable = null;
	this.GotoSkypeBtn = null;
	this.init = false;

}
SceneminiCannotCallInDualView.prototype.initialize = function(){
	alert("SceneminiCannotCallInDualView.initialize()");
	this.create();
	this.init=true;
}
SceneminiCannotCallInDualView.prototype.handleShow = function () {
	alert("SceneminiCannotCallInDualView.handleShow()");
	$.sfScene.get({id:WIDGET.name, scope:WIDGET.id}).helpbarType=2;
	this.ShowKeyHelpbar();

}
SceneminiCannotCallInDualView.prototype.handleHide = function () {
	alert("SceneminiCannotCallInDualView.handleHide()");
}
SceneminiCannotCallInDualView.prototype.handleFocus = function () {
	alert("SceneminiCannotCallInDualView.handleFocus()");
	var currentHighlight =  this.MainView.getCurrentHighlight();
    if(currentHighlight ==null)
    {
        this.highlight(this.StatusBtn);
    }
    else
    {
         this.highlight(currentHighlight);
    }
    this.ShowKeyHelpbar()
}

SceneminiCannotCallInDualView.prototype.handleBlur = function () {
	alert("SceneminiCannotCallInDualView.handleBlur()");
	  this.highlight(null);
	
}

SceneminiCannotCallInDualView.prototype.handleKeyDown = function (keyCode) {
	alert("SceneminiCannotCallInDualView.handleKeyDown(" + keyCode + ")");
	// TODO : write an key event handler when this scene get focued
	
	PluginAPIMgr.PlayAudio(keyCode);
	switch (keyCode) {
		case $.sfKey.LEFT:
			this.processLeftKey();
			break;
		case $.sfKey.RIGHT:
			this.processRightKey();
			break;
		case $.sfKey.UP:
  			this.processUpKey();
			break;
		case $.sfKey.DOWN:
           this.processDownKey();
			break;
		case $.sfKey.RED:
			StateMgr.Start_Signout_State();
			break;
		case $.sfKey.BLUE:
			$.sfScene.get({id:WIDGET.name, scope:WIDGET.id}).processBlueKey();
			break;
		case $.sfKey.ENTER:
            this.processEnterKey();
			break;
        
		case $.sfKey.TOOLS:
			$.sfScene.get({id:WIDGET.name, scope:WIDGET.id}).processToolsKey();
			break; 
            
		case $.sfKey.RETURN:
			this.processReturnKey();
			$.sfKey.block(event);
			break;
		case $.sfKey.EXIT:
			$.sfScene.get({id:WIDGET.name, scope:WIDGET.id}).processExitKey();
			break;
		case	ENUM_CALL_BLOCK_KEY_CODE.DUALVIEW:
			WndMgr.StartOneBottonPopup(OneBtnPopupIndex.FUNCTION_ISNT_AVAILABLE);
			break;	
        case 147:  //infolink
        case 261:  //contents
        case 115:  //wiselink
            ProcMgr.processInfolinkKey(); 
			break;
		default:
         //   ProcMgr.processBlockKey(keyCode);
            break;
	}
	
	if(Flag_Hidden_State==false)
		event.stopPropagation();
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////
SceneminiCannotCallInDualView.prototype.create = function(){
	alert("SceneminiCannotCallInDualView.create()");
	this.MainView  = new View("miniCannotCallInDualView");
	
	var CurLangID = ResMgr.GetCurLanguage();
	this.StatusBtn  = new Button();
    this.StatusBtn.SetImageObjId("dualview_status_btn");
    this.StatusBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_CONTACT_INPUT_ITEM_NORMAL_BG);
    this.StatusBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_CONTACT_INPUT_ITEM_HIGHLIGHT_BG);
	this.StatusBtn.SetBgImage(BtnImgIndex.BTN_SELECTED_IMG, g_Image.IMAGE_LIST_MAIN_CONTACT_INPUT_ITEM_HIGHLIGHT_BG);
    this.StatusBtn.SetTextObjId("dualview_status_btn_text");
    this.StatusBtn.SetIsPlainText(true);
    this.StatusBtn.SetText(PluginAPIMgr.GetMyDisplayName());
    this.StatusBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE,"list_main_category_btn_style_nor");
    this.StatusBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE,"list_main_category_btn_style_focus");     	
	this.StatusBtn.SetIconObjId("dualview_status_btn_icon");
    this.StatusBtn.SetBgIcon(0,PluginAPIMgr.GetMyOnlineStateImage());		
	this.StatusBtn.SetOnClickCallbackFunc(clickCF);
	this.StatusBtn.SetOnMouseOverCallbackFunc(function(obj){
	    this_.processMouseOver(obj);
	});
    this.StatusBtn.setTextKPILog(KPI_LOG_ITEM_ID.ONLINE_STATUS_BTN);

    this.SignOutBtn = new Button();
    this.SignOutBtn.SetImageObjId("dualview_sign_out_btn");
    this.SignOutBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_CONTACT_SIGN_OUT_NORMAL_BG);
    this.SignOutBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_CONTACT_SIGN_OUT_HIGHLIGHT_BG);
	this.SignOutBtn.SetBgImage(BtnImgIndex.BTN_SELECTED_IMG, g_Image.IMAGE_LIST_MAIN_CONTACT_SIGN_OUT_OVER_BG);
	this.SignOutBtn.SetOnClickCallbackFunc(clickCF);
	this.SignOutBtn.SetOnMouseOverCallbackFunc(function(obj){
        this_.processMouseOver(obj);
    });
    this.SignOutBtn.setTextKPILog(KPI_LOG_ITEM_ID.LOGOUT_BTN);
    
	this.MsgLable = new Label(null,"mini_cannotcall_indualview_msg");
	this.MsgLable.SetTextStyle("mini_cannotcall_indualview_msg_style");
//	if(CurLangID == ENUM_TV_LANGUAGE.KOR){
//		this.MsgLable.SetText("DualView  Skype app  .\n  Skype app ");
//	}else{
	this.MsgLable.SetText(TV_SID_FUNCTION_UNAVAILABEL_WHILE_SAMSUNG_MULTI_VIEW+"<br><br>"+TV_SID_CAN_CALLS_YOUR_TV_SKYPE_APP
+"<br><br>"+TV_SID_SELECT_BUTTON_BELOW_TO_GO_SKYPE);
//	}	
	var this_ = $.sfScene.get({id:"miniCannotCallInDualView", scope:WIDGET.id});
  	var clickCF =  function(obj){this_.processClickEvent(obj);};
  	
  	this.GotoSkypeBtn= new Button();
    this.GotoSkypeBtn.SetImageObjId("mini_cannotcall_indualview_btn",20);
    this.GotoSkypeBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_WELCOME_BTN_NORMAL);
    this.GotoSkypeBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_WELCOME_BTN_NORMALFOCUS);
    this.GotoSkypeBtn.SetTextObjId("mini_cannotcall_indualview_btn_text");
    this.GotoSkypeBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE,"mini_cannotcall_indualview_btn_normal_style");
	this.GotoSkypeBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE,"mini_cannotcall_indualview_btn_select_style");
    this.GotoSkypeBtn.SetText(TV_SID_GO_TO_SKYPE);
    this.GotoSkypeBtn.setTextKPILog(KPI_LOG_ITEM_ID.GO_TO_SKYPE_BTN);
    
    this.GotoSkypeBtn.SetOnClickCallbackFunc(clickCF);
    this.GotoSkypeBtn.SetOnMouseOverCallbackFunc(function(obj){
        this_.processMouseOver(obj);
    });
}
SceneminiCannotCallInDualView.prototype.ShowKeyHelpbar = function(){
	if(WIDGET.mouse==true){
		helpBarHandler.showHelpIcon('red',SID_LOGOUT);
		helpBarHandler.hideHelpIcon('green',"");
		helpBarHandler.hideHelpIcon('yellow',"");
		helpBarHandler.showHelpIcon('blue',TV_SID_CHANGE_VIEW);
		helpBarHandler.showHelpIcon('tools',sfLang.SID_TOOLS);
		helpBarHandler.showHelpIcon('return',SID_RETURN);
		helpBarHandler.setHelpIconClickEvent('help_red',function(){
			var Scene = $.sfScene.get({id:"miniCannotCallInDualView", scope:WIDGET.id});
			Scene.handleKeyDown($.sfKey.RED);
		});


	}else{
		$("#HomeHelp").sfKeyHelp({
			'red' : SID_LOGIN,
			'blue' : TV_SID_CHANGE_VIEW,
			'tools' : sfLang.SID_TOOLS,
			'return' : SID_RETURN
		});	
	}
	

}
SceneminiCannotCallInDualView.prototype.updateOnlineStatus= function()
{
    this.StatusBtn.SetBgIcon(0,PluginAPIMgr.GetMyOnlineStateImage());
	this.StatusBtn.SetBgIcon(1,PluginAPIMgr.GetMyOnlineStateImage());
}
SceneminiCannotCallInDualView.prototype.highlight=function(obj)
{
	alert("SceneminiCannotCallInDualView.highlight()");
    this.MainView.setCurrenHighlight(obj);
}
SceneminiCannotCallInDualView.prototype.processUpKey = function(){
	alert("SceneminiCannotCallInDualView.processUpKey() ");
	var currentHighlight =  this.MainView.getCurrentHighlight();
    if(currentHighlight ==this.StatusBtn||currentHighlight ==this.SignOutBtn ){
    	ProcMgr.returnTab();
    }else {
    	this.highlight(this.StatusBtn);
    }
}
SceneminiCannotCallInDualView.prototype.processDownKey = function(){
	alert("SceneminiCannotCallInDualView.processDownKey() ");
	var currentHighlight =  this.MainView.getCurrentHighlight();
   if(currentHighlight ==this.StatusBtn||currentHighlight ==this.SignOutBtn ){
    	this.highlight(this.GotoSkypeBtn);
    }
}
SceneminiCannotCallInDualView.prototype.processLeftKey = function(){
	alert("SceneminiCannotCallInDualView.processLeftKey() ");
	var currentHighlight =  this.MainView.getCurrentHighlight();
    if(currentHighlight ==this.SignOutBtn ){
    	this.highlight(this.StatusBtn);
    }else{
    	$.sfScene.get({id:WIDGET.name, scope:WIDGET.id}).processLeftKey();
    }
}
SceneminiCannotCallInDualView.prototype.processRightKey = function(){
	alert("SceneminiCannotCallInDualView.processRightKey() ");
	var currentHighlight =  this.MainView.getCurrentHighlight();
    if(currentHighlight ==this.StatusBtn ){
    	this.highlight(this.SignOutBtn);
    }else{
    	$.sfScene.get({id:WIDGET.name, scope:WIDGET.id}).processRightKey();
    }
}
SceneminiCannotCallInDualView.prototype.processEnterKey = function(){
	alert("SceneminiCannotCallInDualView.processEnterKey() ");
	var currentHighlight =  this.MainView.getCurrentHighlight();
    if(currentHighlight ==this.StatusBtn ){
    	$.sfScene.get({id:WIDGET.name, scope:WIDGET.id}).LC_addEvent("EV014", "SETSTATUS");
		StateMgr.Start_Mini_Status_Change();
    }else if(currentHighlight ==this.SignOutBtn ){
    	$.sfScene.get({id:WIDGET.name, scope:WIDGET.id}).LC_addEvent("EV015", "SIGNOUT");
    	StateMgr.Start_Signout_State();
    }else if(currentHighlight ==this.GotoSkypeBtn ){
    	WndMgr.StartCallConfirmPopup(MINI_CALL_CONFIRM_POPUP.GO_TO_SKYPE);
    }
	
}
SceneminiCannotCallInDualView.prototype.processReturnKey = function(){
	alert("SceneminiCannotCallInDualView.processReturnKey() ");
	if(ProcMgr.isCalling==false){
		//back to the main state
		StateMgr.Start_Main_State();
	}else{
		//during call... exit socialTV
		$.sfScene.get({id:WIDGET.name, scope:WIDGET.id}).processExitKey();
	}
}
///////// Processing Click evnet  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
SceneminiCannotCallInDualView.prototype.processMouseOver = function(obj){
    alert("SceneminiCannotCallInDualView.processMouseOver() ");
    
}
SceneminiCannotCallInDualView.prototype.processClickEvent = function(obj){
	alert("SceneminiCannotCallInDualView.processClickEvent() ");
	
}

