

function SceneminiSignout(options) {
	this.options = options;
    
    this.miniSignoutView=null;
	this.miniSignoutDim=null;
	this.miniSignoutViewBG=null;
    
    this.PopupMsg = null;
    this.YesBtn = null;
    this.NoBtn = null;
    
    this.flagWaiting = false;
	
	this.CloseTimer = false;
   
}

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

SceneminiSignout.prototype.handleShow = function () {
	alert("SceneminiSignout.handleShow()");
	// this function will be called when the scene manager show this scene 
	// this.miniSignoutDim.show();
    // this.highlight(this.NoBtn);
// 	
	// this.startTimer();
	this.showPopup();
}

SceneminiSignout.prototype.handleHide = function () {
	alert("SceneminiSignout.handleHide()");
	// this function will be called when the scene manager hide this scene 
	// this.miniSignoutDim.hide(); 
// 	
	// if (this.CloseTimer == true)
    // {
        // this.stopTimer();
    // }
}

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

}

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

SceneminiSignout.prototype.handleKeyDown = function (keyCode) {
	alert("SceneminiSignout.handleKeyDown(" + keyCode + ")");
	// TODO : write an key event handler when this scene get focued
	PluginAPIMgr.PlayAudio(keyCode);
	switch (keyCode) {
		case $.sfKey.LEFT:
		case $.sfKey.RIGHT:
			break;
		case $.sfKey.UP:

			break;
		case $.sfKey.DOWN:

			break;

		case $.sfKey.ENTER:
			break;
            
        case $.sfKey.RETURN:
        case $.sfKey.EXIT:
			break;

         case 147:  //infolink
         case 261:  //contents
         case 115:  //wiselink
            ProcMgr.processInfolinkKey(); 
			break;
	}
	if(Flag_Hidden_State==false)
		event.stopPropagation();
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////
SceneminiSignout.prototype.showPopup=function(){
	alert("SceneminiSignout.showPopup() ");
	$("#Default_Popup").sfPopup(
	{
		text : TV_SID_DO_YOU_WANT_TO_SIGN_OUT,
		num : 2,
		focus : "right",
		callback : function(pRtn) {
			var Scene = $.sfScene.get({id:"miniSignout", scope:WIDGET.id});
			if (pRtn == true) {
				$("#skype_default_dim").hide();
				$("#Default_Popup").sfPopup("hide");
				Scene.requestSignout();
				// // Interactive Remote Start
				// iRemoteSocialTV.sendPopupOff();
				// // Interactive Remote End
				// Util.turnOn3D();
				// widgetAPI.sendExitEvent();
	
			} else {
				$("#skype_default_dim").hide();
				$("#Default_Popup").sfPopup("hide");
				StateMgr.Stop_Signout_State(true);
				// // Interactive Remote Start
				// iRemoteSocialTV.sendPopupOff();
				// // Interactive Remote End
				// if (pCancelFn && typeof pCancelFn == "function")
					// pCancelFn();
			}
		}
	});
	$("#skype_default_dim").show();
	$("#Default_Popup").sfPopup("show");

}
SceneminiSignout.prototype.requestSignout = function()
{
    alert("SceneminiSignout.requestSignout() ");
    
    // this.disableButton();
    ProcMgr.Signout(false);     
}

