/*
 Title: SNSList2.js
 Skype Mini widget
 */
alert('SceneSNSList2(Skype).js loaded');
/*
 Class: SceneSNSList2
 Control Skype Mini widget
 */
var WIDGET = {
	id : "Skype",
	name : "SNSList2",
	mouse : true						//SocialTV May RC
};
var SKYPE_DIV = "feed_content_list_Skype";
var Flag_Hidden_State = false;
var SKYPE_MINI_PATH = "/mtd_down/widgets/user/Skype/";
var SKYPE_MINI_DRM_PATH = "/mtd_down/widgets/user/Skype_img/";
var SKYPE_MINI_ROOT_PATH = SKYPE_MINI_PATH;

function SceneSNSList2() {
	this.tabFocus = true;
	this.isPopupView =  false;
	this.helpbarType = 0;
	$this = this;
}

SceneSNSList2.prototype.setMouseFlag = function(flag){
	alert("##mini##SceneSNSList2.setMouseFlag()");
	WIDGET.mouse = flag;
}
SceneSNSList2.prototype.getMouseFlag = function(){
	alert("##mini##SceneSNSList2.getMouseFlag() : "+WIDGET.mouse);
	return WIDGET.mouse;
}

SceneSNSList2.prototype.initialize = function() {
	alert("##mini##SceneSNSList2.initialize()");
	this.ShowKeyHelpbar();
	if(this.getMouseFlag()){
		helpBarHandler.setHelpIconList(SKYPE_ID);
	}
	//add return focus event
	window.addEventListener('mouseup', function(e) {
		if(utilitySet.getCurrentFocusedSNSId()==WIDGET.id){
			setTimeout(function() {
			alert("##mini##returnFocus!!");
			$.sf.returnFocus();
			}, 0);
		}
	});
	
	if(document.getElementById(SKYPE_DIV)!=null){
	    $("#"+SKYPE_DIV).parent().css("height","445px");
        $("#"+SKYPE_DIV).parent().css("width","313px");
        $("#"+SKYPE_DIV).parent().css("top","-4px");
        $("#"+SKYPE_DIV).parent().css("left","-5px");
		$("#"+SKYPE_DIV).css("height","445px");
		$("#"+SKYPE_DIV).css("width","313px");
	}
	if(document.getElementById("skype_default_dim")==null){
        $("body").append("<div id='skype_default_dim' class = 'dim'></div>");
    }
    if(document.getElementById("skype_popup_background")==null){
        $("body").append("<div id='skype_popup_background' class = 'background'></div>");
	}
	
	if(document.getElementById("miniOneButtonPopup_id")==null)
		$("#Default").append("<div id='miniOneButtonPopup_id'></div>");
	if(document.getElementById("miniCallEnding_id")==null)	
		$("#Default").append("<div id='miniCallEnding_id'></div>");
	if(document.getElementById("miniCallConfirmPopup_id")==null)
		$("#Default").append("<div id='miniCallConfirmPopup_id'></div>");
	if(document.getElementById("miniVolume_id")==null)
		$("#Default").append("<div id='miniVolume_id'></div>");		
				
	this.initSkype();
	
};

SceneSNSList2.prototype.handleShow = function() {
	alert("##mini##SceneSNSList2.handleShow()");
	// this function will be called when the scene manager show this scene
	/*
	if(Flag_Hidden_State ==true)
		{
			this.onShow();	
		}*/
	
}

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

SceneSNSList2.prototype.handleFocus = function() {
		alert("##mini##SceneSNSList2.handleFocus()");
//	alert("##mini##Current Focus =  "+utilitySet.getCurrentFocusedSNSId());

	/*
	if(utilitySet.getCurrentFocusedSNSId()!=WIDGET.id)
		return ;
	*/
			
	//  alert("flag_hidden_flag = " + Flag_Hidden_State);
	
	this.ShowKeyHelpbar();
	// this function will be called when the scene manager focus this scene
	
	if (this.tabFocus == false) {
		alert("##mini##tabFocus : "+this.tabFocus);	
		utilitySet.changeTabBGStatus(WIDGET.id,'focus',true);
		StateMgr.Focus_Current_State();
	} else {
		alert("##mini##tabFocus : "+this.tabFocus);
		utilitySet.changeTabBGStatus(WIDGET.id,'focus',false);	
		this.PrintKPILog(KPI_LOG_ITEM_ID.SKYPE_TAB_ICON);
	}
}

SceneSNSList2.prototype.handleBlur = function() {
	alert("##mini##SceneSNSList2.handleBlur()");
	/*
	if( utilitySet.getCurrentFocusedSNSId()==WIDGET.id&&this.isPopupView==false)
	{
				
	//	this.tabFocus=false;
		}*/
	
	//this.isFocused = false;
	// this function will be called when the scene manager move focus to another scene from this scene
}
/*
 Function: handleKeyDown
 Key handler

 Parameters:
 keyCode - Key code
 */
SceneSNSList2.prototype.handleKeyDown = function(keyCode) {
	alert("#mini##SceneSNSList2.handleKeyDown(" + keyCode + ") tabFocus : "+this.tabFocus);
	if(TVCOMM_SERVICE_MODE == TVCHAT_MODE_HIDDEN && !(keyCode==$.sfKey.RETURN ||keyCode==$.sfKey.EXIT||keyCode==$.sfKey.BLUE)){
		return;
	}
	switch (keyCode) {
		case $.sfKey.DOWN:
			this.processDownKey();
			break;
		case $.sfKey.LEFT:
			this.processLeftKey();
			break;
		case $.sfKey.RIGHT:
			this.processRightKey();
			break;
		case $.sfKey.RED:
			this.processRedKey();
			break;
		case $.sfKey.TOOLS:
			this.processToolsKey();
			break;
		case $.sfKey.BLUE:
			this.processBlueKey();
			break;
		case $.sfKey.RETURN:
		case $.sfKey.EXIT:
			this.processExitKey();
			break;
			
		case	ENUM_CALL_BLOCK_KEY_CODE.DUALVIEW:
			WndMgr.StartOneBottonPopup(OneBtnPopupIndex.FUNCTION_ISNT_AVAILABLE);
			break;
	}
	//if(Flag_Hidden_State==false)
	event.stopPropagation();
}

SceneSNSList2.prototype.processDownKey = function() {
	alert("##mini##***** SceneSNSList2.processDownKey()");
	if(StateMgr.GetCurrentState()=="miniWidgetLoading")
		return ;
		
	if (utilitySet.getCurrentFocusedSNSId() == WIDGET.id && this.tabFocus == true) {
		//this.tabFocus = false;
		StateMgr.Focus_Current_State();
	}
}

SceneSNSList2.prototype.processLeftKey = function() {
	alert("##mini##***** SceneSNSList2.processLeftKey()");
	
	if(StateMgr.GetCurrentState()=="miniWidgetLoading"||ProcMgr.isCalling){
		alert("##mini##[SkypeMini] Skype Loading....");
		return;
	}

	//RecogMgr.StopVoiceRecog();
	
	$.sfScene.get("Home").prevService();
	if(commonFlagSet.is_skype_focused&&commonFlagSet.is_skype_focused!=undefined)
		commonFlagSet.is_skype_focused =  false;
}

SceneSNSList2.prototype.processRightKey = function() {
	alert("##mini##***** SceneSNSList2.processRightKey()");
	
	if(StateMgr.GetCurrentState()=="miniWidgetLoading"||ProcMgr.isCalling){
	alert("##mini##[SkypeMini] Skype Loading....");
		return;
	}
	 
	if (utilitySet.hasNextTab() != true) {
			return;	
	}	
	 
	//  RecogMgr.StopVoiceRecog();
	$.sfScene.get("Home").nextService();
	f(commonFlagSet.is_skype_focused&&commonFlagSet.is_skype_focused!=undefined)
		commonFlagSet.is_skype_focused =  false;
}
SceneSNSList2.prototype.processRedKey = function() {
	alert("##mini##***** SceneSNSList2.processRedKey()");
	
	alert("-------------------------------this.helpbarType = "+this.helpbarType);
	if(this.helpbarType == 0)
		return;
	else if(this.helpbarType==1){
		$.sfScene.get({
			id : "miniWelcome",
			scope : WIDGET.id
		}).processEnterKey();
		
	}else if(this.helpbarType==2){
		StateMgr.Start_Signout_State();
		//signout
	}
}
SceneSNSList2.prototype.processBlueKey = function() {
	alert("##mini##***** SceneSNSList2.processBlueKey()");
	TVComm.changeMode();
	this.CheckHiddenMode();
	}
SceneSNSList2.prototype.processToolsKey = function() {
	alert("##mini##***** SceneSNSList2.processToolsKey()");
	StateMgr.StopSubState();
	if (this.getMouseFlag()) {
		popupHandler.showPopup(popupHandler.SERVICE_TOOLS_POPUP);
	} else {// delete later
		var instanceServiceSetting = $.sfScene.get("ServiceSetting");
	
	instanceServiceSetting.reset();
	instanceServiceSetting.set(function(pEvent) {
		if(pEvent == EVENT_SOCIAL_KEY) {
			$this.returnToCategory();
		} else {
				$.sfScene.get("Home").focusCurService();
		}
		});
		$.sfScene.show("ServiceSetting");
		$.sfScene.focus("ServiceSetting");
	
	}
}

SceneSNSList2.prototype.processExitKey = function() {
	alert("##mini##***** SceneSNSList2.processExitKey()");
	StateMgr.StopSubState();
	
	if (this.getMouseFlag()) {
		if(event) {
			$.sfKey.block(event);
		}
		$.sfScene.focus("Home");
		exitPopupHandler.showExitPopup();
	}else{
		TVComm.returnEvent();
	}

}

SceneSNSList2.prototype.CheckHiddenMode = function() {
	alert("##mini##***** SceneSNSList2.CheckHiddenMode() : "+TVCOMM_SERVICE_MODE);
	
	if(TVCOMM_SERVICE_MODE == TVCHAT_MODE_HIDDEN){
		RecogMgr.StopVoiceRecog();
		$("#"+SKYPE_DIV).hide();
		if(document.getElementById("Default")!=null)
			$("#Default").hide();
		Flag_Hidden_State = true;
		PluginAPIMgr.SetSkypeWidgetState(0);
	}else{
				
		var LoginState = PluginAPIMgr.GetLoginState();
		if(LoginState == "2") //logged in state
	    {
			if (PluginAPIMgr.IsCallInProgress() == "1") {
	     		if(PluginAPIMgr.GetScreenViewMode()==1){
	     			//modify by minseok : 130610
	     			//during dual view -> go to skype
	     			ProcMgr.isCalling = true;
	     			StateMgr.Start_NotCall_In_DualView_State();
	     		}else{
	     			ProcMgr.isCalling = true;
		     		ProcMgr.getCallInfo();
		     		ProcMgr.StartCall();	
	     		}
			} else {
	     		if(PluginAPIMgr.IsInCall()==1) //incoming call
         		{
					if (!PluginAPIMgr.IsConference()) {
         				ProcMgr.IncomingCall();
					} else {
         				ProcMgr.IncomingConferenceCall();
         			} 
         		}	     		
	     	}           	
	     }
				
		
		$("#"+SKYPE_DIV).show();
		if(document.getElementById("Default")!=null)
			$("#Default").show();
		Flag_Hidden_State = false;
		PluginAPIMgr.SetSkypeWidgetState(2);
		
		RecogMgr.StartVoiceRecog();
	}
}
SceneSNSList2.prototype.initSkype = function() {
	alert("##mini##***** SceneSNSList2.initSkype() :" +TVCOMM_SERVICE_MODE);


	PluginAPIMgr.initPluginAPI();
	ProcMgr.getTVModel();
	//**********register event*************
	ProcMgr.registerKey();
	
	var currentLanguage = parseInt($.sf.plugin('TV').GetLanguage());
	/*var lang_file_path = SKYPE_MINI_ROOT_PATH+"app/mini/lang/"+TV_LANGUAGE_CODE[currentLanguage]+".js"; 
	var fs = new FileSystem();
	var fd =fs.openCommonFile(lang_file_path, 'r');*/
	//var fd = $.sf.readFile(lang_file_path);
	
	if (PluginAPIMgr.ImgFolderExist() == 1) {
		SKYPE_MINI_ROOT_PATH = SKYPE_MINI_DRM_PATH;
	} else {
		SKYPE_MINI_ROOT_PATH = SKYPE_MINI_PATH;
	}
	
	var lang_file_path = SKYPE_MINI_ROOT_PATH+"app/mini/lang/"+TV_LANGUAGE_CODE[currentLanguage]+".js";
	
	alert("##mini##***** SceneSNSList2 ->load_langfile : "+lang_file_path);
	
	this_ = this;
	$.sf.loadJS(lang_file_path, function(){	
		KPI_LOG_ITEM_ID ={
			SKYPE_TAB_ICON : TV_SKYPE_VOICE,
			ONLINE_STATUS_BTN : IDWS_MOIP_SETTING_ONLINE_STATUS,
			ONLINE_BTN :IDWS_MOIP_SETTING_ONLINE,
			AWAY_BTN : IDWS_MOIP_SETTING_AWAY,
			DO_NOT_DISTURB_BTN : IDWS_MOIP_SETTING_DO_NOT_DISTURB,
			INVISIBLE_BTN : IDWS_MOIP_SETTING_INVISIBLE,
			OFFLINE_BTN : TV_SID_OFFLINE,
			LOGIN_BTN : IDWS_MOIP_SKYPE_SIGNIN,
			LOGOUT_BTN : IDWS_MOIP_POPUP_EXIT_SIGN_OUT,
			OK_BTN : SID_OK_KR_YES,
			CANCEL_BTN : SID_CANCEL,
			VOICE_CALL_BTN :IDWS_MOIP_VOICE_CALL_KR_VOICE,
			VIDEO_CALL_BTN : IDWS_MOIP_VIDEO_CALL_KR_VOICE,
			GO_TO_SKYPE_BTN : TV_SID_GO_TO_SKYPE,
			ADD_TO_CONTACTS_BTN : IDWS_MOIP_ADD_TO_CONTACTS,
			IGNORE_BTN:SID_IGNORE_KR_SHORT,
			BLOCK_BTN:IDWS_MOIP_SKYPE_BLOCK
		};
		$.sf.loadJS(SKYPE_MINI_ROOT_PATH+"app/mini/Define/ImagePath.js", function(){	
		this_.notyLoadedSkype();
		StateMgr.Start_Init_State();
			$.sf.returnFocus();
		});
	});
	
}

SceneSNSList2.prototype.notyLoadedSkype = function() {
	alert("##mini##***** SceneSNSList2.notyLoadedSkype()");
	//commonFlagSet.is_skype_loaded = true; 
	//commonFlagSet.is_voice_unsubscribed = true;
	if (utilitySet.getCurrentFocusedSNSId() == WIDGET.id) {
		alert("##mini##***** SceneSNSList2. serviceFocusMoveHandler.giveFocusToMe(SKYPE_ID);");
		serviceFocusMoveHandler.giveFocusToMe(SKYPE_ID);
	}
}

SceneSNSList2.prototype.ShowKeyHelpbar = function(){
	if(this.getMouseFlag()){
		switch(this.helpbarType){
			case 0:
				// red nothing
				helpBarHandler.hideHelpIcon('red',"");
				helpBarHandler.hideHelpIcon('green',"");
				helpBarHandler.hideHelpIcon('yellow',"");
				helpBarHandler.showHelpIcon('blue',TV_SID_CHANGE_VIEW);
				helpBarHandler.showHelpIcon('tools',sfLang.SID_TOOLS);
				helpBarHandler.showHelpIcon('return',SID_RETURN);
				break;
			case 1:
				//login
				helpBarHandler.showHelpIcon('red',SID_LOGIN);
				helpBarHandler.hideHelpIcon('green',"");
				helpBarHandler.hideHelpIcon('yellow',"");
				helpBarHandler.showHelpIcon('blue',TV_SID_CHANGE_VIEW);
				helpBarHandler.showHelpIcon('tools',sfLang.SID_TOOLS);
				helpBarHandler.showHelpIcon('return',SID_RETURN);
				break;
			case 2:
				//logout
				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);
				break;	
		}
		var this_=this;
		helpBarHandler.setHelpIconClickEvent('help_red',function(){
			this_.processRedKey();
		});
		helpBarHandler.setHelpIconClickEvent('help_blue',function(){
			this_.processBlueKey();
		});
		helpBarHandler.setHelpIconClickEvent('help_tools',function(){
			this_.processToolsKey();
		});
		helpBarHandler.setHelpIconClickEvent('help_return',function(){
			this_.processExitKey();
		});
	}else{
		switch(this.helpbarType){
			case 0:
				// red nothing
			$("#HomeHelp").sfKeyHelp({
				'blue' : TV_SID_CHANGE_VIEW,
				'tools' : sfLang.SID_TOOLS,
				'return' : SID_RETURN
			});
			break;
			case 1:
				//login
			$("#HomeHelp").sfKeyHelp({
				'red' : SID_LOGIN,
				'blue' : TV_SID_CHANGE_VIEW,
				'tools' : sfLang.SID_TOOLS,
				'return' : SID_RETURN
			});
			break;
			case 2:
				//logout
			$("#HomeHelp").sfKeyHelp({
				'red' : SID_LOGOUT,
				'blue' : TV_SID_CHANGE_VIEW,
				'tools' : sfLang.SID_TOOLS,
				'return' : SID_RETURN
			});
			break;	
		}
	}
}
//for event!!!!
//from oter tab to skype 
SceneSNSList2.prototype.FocusSkype = function() {
	if(Flag_Hidden_State==true)
		return false;
	if(this.tabFocus==false)
		return true;
	alert('*****************************SceneSNSList2.FocusSkype');	
	utilitySet.changeTabBGStatus(WIDGET.id,'focus',true);
	this.tabFocus = false;
	return true ;
}

SceneSNSList2.prototype.onShow = function(){
	alert("##mini##SceneSNSList2.onShow() SceneSNSList2 Show...");
	if(Flag_Hidden_State==false)
		return;

	//before SetSkypeWidgetState
	if (WndMgr.Is1366x768Panel() == true) {
		PluginAPIMgr.SetTVRecvRect(996,154,296,222);
		PluginAPIMgr.SetTVPreviewRect(996,386,296,222);
		PluginAPIMgr.SetCallingViewRect(1067,504,160,120);
	} else {
		PluginAPIMgr.SetTVRecvRect(1400,217,420,315);
		PluginAPIMgr.SetTVPreviewRect(1400,543,420,315);
		PluginAPIMgr.SetCallingViewRect(1500,710,228,171);
	}
	
	this.CheckHiddenMode();
	
	ProcMgr.registerKey(); 

	if (ProcMgr.isCalling == true) {
		ProcMgr.registerCallKey();
		
		if(ProcMgr.isUDmodel == true && TVCOMM_SERVICE_MODE == TVCHAT_MODE_FULL && ProcMgr.falg_converting_UD_to_FHD == false)
		{
			ProcMgr.falg_converting_UD_to_FHD = true;		
			PluginAPIMgr.ConvetFHDfromUD(true);
		}
	}
		
	if (TVCOMM_SERVICE_MODE != TVCHAT_MODE_HIDDEN) {
		if (StateMgr.GetCurrentState() == 'miniSkypeCall') {
			$.sfScene.get({
				id : 'miniSkypeCall',
				scope : WIDGET.id
			}).RecoveryCamBtn();
		} else if (StateMgr.GetCurrentState() == 'miniIncomingCall') {
			$.sfScene.get({
				id : 'miniIncomingCall',
				scope : WIDGET.id
			}).RecoveryCamBtn();
		}
	}
		
	if(PluginAPIMgr.GetScreenViewMode()==1){		//for dual view 130610
		alert("##mini##SceneSNSList2.GetScreenViewMode() == 1 ");
		PluginAPIMgr.WidgetHandleIncomingCall(0); //to display Incomgin Call scene of widget 
		// PluginAPIMgr.SetSkypeWidgetState(0);
	}else{
		alert("##mini##SceneSNSList2.GetScreenViewMode() == 0 ");
		PluginAPIMgr.WidgetHandleIncomingCall(1); 
	}
	var this_ = this;
	if(document.getElementById("Default")!=null)
		$("#Default").show();
	setTimeout(function() {
		if (this_.tabFocus == false) {
			utilitySet.changeTabBGStatus(WIDGET.id, 'focus', true);
			// to apply after socialtv's tab icon change process
		}
		alert("##mini##SceneSNSList2.onshow() $.sf.returnFocus")// insert returnFocus because click the other tab
		$.sf.returnFocus();
	}, 0);

}
SceneSNSList2.prototype.onHide = function(){

	if(Flag_Hidden_State==true){
		alert("##mini##SceneSNSList2.onHide () already called hide code! Flag_Hidden_State :" + Flag_Hidden_State);
		return;
	}

	//close resource
	if (ProcMgr.isCalling == true) {
	
		//mute sub window
		PluginAPIMgr.SubVideoMute();
		
		if(ProcMgr.isUDmodel == false && PluginAPIMgr.IsSkypeSupportMultitasking() == 1)
		{				
			PluginAPIMgr.StopReceiveVideo();
			ProcMgr.StopSendVideo();
		}
		else {
			ProcMgr.DisconnectCall(true);
		}
	}	
	
	alert("##mini##SceneSNSList2.onHide() SceneSNSList hide...");
	
	Flag_Hidden_State = true;

	$("#"+SKYPE_DIV).hide();
	if(document.getElementById("Default")!=null)
		$("#Default").hide();
	RecogMgr.StopVoiceRecog();

	if(ProcMgr.falg_converting_UD_to_FHD == true)
	{		
		ProcMgr.falg_converting_UD_to_FHD = false;
		PluginAPIMgr.ConvetFHDfromUD(false);
	}
	
	if (ProcMgr.isCalling != true) {
		if(PluginAPIMgr.IsInCall()==1 && TVCOMM_SERVICE_MODE != TVCHAT_MODE_HIDDEN && ProcMgr.isIncomingCall== false)  // calling 	
		{
			ProcMgr.CancelCall();
		}	
	}
	
	if (ProcMgr.isVoiceMailSending == true) {
		 ProcMgr.CancelVoiceMail();
	} 
	
	//ProcMgr.isCalling = false;
	PluginAPIMgr.SetSkypeWidgetState(0);
	ProcMgr.unregisterCallKey();
	ProcMgr.unregisterKey();
	
}

SceneSNSList2.prototype.onDestroy = function(){
	alert("##mini##SceneSNSList2.onDestroy() SceneSNSList2 Destroy...");
	
	Flag_Hidden_State = false;
	
	if (ProcMgr.isVoiceMailSending == true) {
		 ProcMgr.CancelVoiceMail();
	}
	RecogMgr.StopVoiceRecog();
    if(ProcMgr.isCalling == true) // already receive inprogress
    {
		if (ProcMgr.isUDmodel == true || PluginAPIMgr.IsSkypeSupportMultitasking() == 0) {
    		ProcMgr.DisconnectCall(true);
		} else {
    		PluginAPIMgr.StopReceiveVideo();
			ProcMgr.StopSendVideo();
    	}       
	} else {
		if(PluginAPIMgr.IsInCall()==1 && TVCOMM_SERVICE_MODE != TVCHAT_MODE_HIDDEN && ProcMgr.isIncomingCall== false)  // calling 
		{
			ProcMgr.CancelCall();
		}	
	}
    
	ProcMgr.isVoiceMailSending = false;
    ProcMgr.isCalling = false;
    
    ProcMgr.unregisterCallKey();
	ProcMgr.unregisterKey();
    
	PluginAPIMgr.SetSkypeWidgetState(0);
	PluginAPIMgr.closePluginAPI();

	
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

SceneSNSList2.prototype.LC_setStartPage= function(bColdPlay){
	alert("##mini##SceneSNSList2.LC_setStartPage() : " + bColdPlay );
	if(Misc.Log){
		Misc.Log.setStartPage(WIDGET.id, bColdPlay);
	}
}

SceneSNSList2.prototype.LC_setEndPage = function() {
	alert("##mini##SceneSNSList2.LC_setEndPage()");
	if(Misc.Log){
		Misc.Log.setEndPage();
	}
}

SceneSNSList2.prototype.LC_addEvent = function(category, eventName) {
	alert("##mini##SceneSNSList2.LC_addEvent()");
	
	if(Misc.Log){

	var oOption = {	
	                          c: '',
	                          v: '',	
	                          d: ''
	
	};
	
	var strEventName = eventName;
	oOption.c = category;	
	
	Misc.Log.addEvent(strEventName, oOption);	
	}
}

SceneSNSList2.prototype.PrintKPILog = function(logText)
{
	var prefix = "[SVTP][0]";
	var postfix = "[EVTP]";
	
	var logMsg = prefix+logText+postfix;
	
	//console.log("[SVTP][0]%s[EVTP]", logText);
	console.log(logMsg);
}

