function SceneListMainProfile(options) {
	this.options = options;
    this.WheelOperation = false;
	this.ListMainProfileView = null;

	this.ListMainProfilePage = new Array(3);
	this.SkypeCreditLabel = null;

	this.VoiceMailExpireLabel = null;
	this.StatusLabel = null;
	this.FullNameLabel = null;
	this.MoodMsgLabel = null;
	this.PasswordLabel = null;

	this.MyCredit = null;
	this.ExpireDate = null;

	this.ChangePictureBtn = null;
	this.OnlineStatusBtn = null;
	this.FullNameBtn = null;
	this.MoodMsgBtn = null;
	this.ChangePasswordBtn = null;

	/*2page*/

	this.EmailLabel = null;
	this.CountryRegionLabel = null;
	this.HomePhoneLabel = null;
	this.OfficePhoneLabel = null;
	this.MobilePhoneLabel = null;
	this.StateProvinceLabel = null;

	this.EmailBtn = null;
	this.CountryRegionBtn = null;
	this.HomePhoneBtn = null;
	this.OfficePhoneBtn = null;
	this.MobilePhoneBtn = null;
	this.StateProvinceBtn = null;

	/*3page*/

	this.CityLabel = null;
	this.GenderLabel = null;
	this.BirthDateLabel = null;

	this.BirthDateLabelDay = null;
	this.BirthDateLabelMonth = null;
	this.BirthDateLabelYear = null;

	this.CityBtn = null;
	this.GenderBtn = null;
	this.BirthDateBtn = null;

	this.BirthDateDay = null;
	this.BirthDateSlash = new Array(2);

	this.BirthDateMonth = null;
	this.BirthDateYear = null;

	this.DayLabel = null;
	this.MonthLabel = null;
	this.YearLabel = null;
	// init value
	this.Init_PictureImg = "";
	this.Init_OnlineStatus = "";
	this.Init_OnlineStatusEnum = "";
	this.Init_FullName = "";
	this.Init_MoodMsg = "";

	this.Init_Email = "";
	this.Init_CountryRegion = "";
	this.Init_CountryName = "";
	this.Init_HomePhone = "";
	this.Init_OfficePhone = "";
	this.Init_MobilePhone = "";
	this.Init_HomePhoneCountryCode = "";
	this.Init_OfficePhoneCountryCode = "";
	this.Init_MobilePhoneCountryCode = "";

	this.PhoneType = 1;

	this.Init_StateProvince = "";

	this.Init_City = "";
	this.Init_Gender = "";

	this.Init_BirthDate = "";
	this.Init_BirthDateDay = "";
	this.Init_BirthDateMonth = "";
	this.Init_BirthDateYear = "";

	/////////////////////////////////////////////////////////ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd

	this.destroyFlag = true;
	this.FlagFocus = false;

	this.ScrollBar = null;
	this.pageNum = 0;
	this.UpArrow = null;
	this.DownArrow = null;

	this.HelpBarData = null;
	this.IsShownObj = false;
	
	this.init = false;
}

SceneListMainProfile.prototype.initialize = function() {
	alert("SceneListMainProfile.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();
	this.init = true;
	//this.showListMainProfile();
}

SceneListMainProfile.prototype.handleShow = function() {
	alert("SceneListMainProfile.handleShow()");
	// this function will be called when the scene manager show this scene
	//this.showListMainProfile();
	this.UpdatePageData(0);
	this.ChangePageNum(0);
	this.HideArrow();
	this.IsShownObj = true;

}

SceneListMainProfile.prototype.handleHide = function() {
	alert("SceneListMainProfile.handleHide()");
	// this function will be called when the scene manager hide this scene
	// currentHighlight = this.ListMainProfileView.getCurrentHighlight();
	this.highlightBirthDate(false);
	this.highlight(null);
	this.IsShownObj = false;
}

SceneListMainProfile.prototype.handleFocus = function() {
	alert("SceneListMainProfile.handleFocus()");

	// this function will be called when the scene manager focus this scene
	this.FlagFocus = true;

	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();
	if(currentHighlight == null) {
		this.highlight(this.ChangePictureBtn);
	} else {
		this.highlight(currentHighlight);
	}

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

	this.FlagFocus = false;

	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();
	if(currentHighlight) {
		currentHighlight.blur();
	}
	this.highlightBirthDate(false);

}

SceneListMainProfile.prototype.handleKeyDown = function(keyCode) {
	//alert("SceneListMainProfile.handleKeyDown(" + keyCode + ")");
	PluginAPIMgr.PlayAudio(keyCode);
	if(ProcMgr.checkWidgetHighlight() == false) {
		return;
	}

	var ridgeDirection = Math.round((keyCode - (5 * 10000000)) / 100000);
	if(ridgeDirection == 1) {// Ridge flick : Up
		if(ProcMgr.GetRidgeFlick() == false) {
			this.ChangeArrow(1);
			ProcMgr.StartRidgeTimer();
		}
	} else if(ridgeDirection == 2) {// Ridge flick : Down
		if(ProcMgr.GetRidgeFlick() == false) {
			this.ChangeArrow(-1);
			ProcMgr.StartRidgeTimer();
		}
	} else {
		switch (keyCode) {
			case sf.key.LEFT:
				this.processLeftKey();
				break;
			case sf.key.RIGHT:
				break;
			case sf.key.UP:
				this.processUpKey();
				break;
			case sf.key.DOWN:
				this.processDownKey();
				break;
			case sf.key.ENTER:
				this.processEnterKey();
				break;
			case sf.key.RETURN:
				this.processReturnKey();
				sf.key.preventDefault();
				break;
			case sf.key.RED:
				this.processRedKey();
				break;

			case sf.key.EXIT:
				this.processExitKey();
				sf.key.preventDefault();
				break;

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

			default:
				ProcMgr.processBlockKey(keyCode);
				break;
		}
	}
}

SceneListMainProfile.prototype.processDownKey = function() {
	alert("SceneListMainProfile.processDownKey() ");
	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();

	switch(currentHighlight) {
		case this.ChangePictureBtn:
			this.highlight(this.OnlineStatusBtn);
			break;
		case this.OnlineStatusBtn:
			this.highlight(this.FullNameBtn);
			break;
		case this.FullNameBtn:
			this.highlight(this.MoodMsgBtn);
			break;
		case this.MoodMsgBtn:
			this.highlight(this.ChangePasswordBtn);
			break;
		case this.ChangePasswordBtn:
			this.highlight(this.EmailBtn);
			break;
		case this.EmailBtn:
			this.highlight(this.CountryRegionBtn);
			break;
		case this.CountryRegionBtn:
			this.highlight(this.HomePhoneBtn);
			break;
		case this.HomePhoneBtn:
			this.highlight(this.OfficePhoneBtn);
			break;

		case this.OfficePhoneBtn:
			this.highlight(this.MobilePhoneBtn);
			break;
		case this.MobilePhoneBtn:
			this.highlight(this.StateProvinceBtn);
			break;
		case this.StateProvinceBtn:
			this.highlight(this.CityBtn);
			break;
		case this.CityBtn:
			this.highlight(this.GenderBtn);
			break;
		case this.GenderBtn:
			this.highlight(this.BirthDateBtn);
			break;
		case this.BirthDateBtn:
			break;
	}

	this.CheckPageChange();
}

SceneListMainProfile.prototype.processUpKey = function() {
	alert("SceneListMainProfile.processUpKey() ");
	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();
	switch(currentHighlight) {
		case this.ChangePictureBtn:
			break;
		case this.OnlineStatusBtn:
			this.highlight(this.ChangePictureBtn);
			break;
		case this.FullNameBtn:
			this.highlight(this.OnlineStatusBtn);
			break;
		case this.MoodMsgBtn:
			this.highlight(this.FullNameBtn);
			break;
		case this.ChangePasswordBtn:
			this.highlight(this.MoodMsgBtn);
			break;
		case this.EmailBtn:
			this.highlight(this.ChangePasswordBtn);
			break;
		case this.CountryRegionBtn:
			this.highlight(this.EmailBtn);
			break;
		case this.HomePhoneBtn:
			this.highlight(this.CountryRegionBtn);
			break;
		case this.OfficePhoneBtn:
			this.highlight(this.HomePhoneBtn);
			break;
		case this.MobilePhoneBtn:
			this.highlight(this.OfficePhoneBtn);
			break;
		case this.StateProvinceBtn:
			this.highlight(this.MobilePhoneBtn);
			break;
		case this.CityBtn:
			this.highlight(this.StateProvinceBtn);
			break;
		case this.GenderBtn:
			this.highlight(this.CityBtn);
			break;
		case this.BirthDateBtn:
			this.highlight(this.GenderBtn);
			break;
	}
	this.CheckPageChange();
}

SceneListMainProfile.prototype.processEnterKey = function() {
	alert("SceneListMainProfile.processEnterKey() ");
	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();

	var IsInCall = ProcMgr.GetIsInCall();

	switch(currentHighlight) {
		case this.ChangePictureBtn:
			if(IsInCall) {
				WndMgr.StartOneBottonPopup(OneBtnPopupIndex.NOT_AVAILABLE_DURING_CALL);
			} else {
				StateMgr.Start_Change_Picture_State();
			}

			break;
		case this.OnlineStatusBtn:
			if(IsInCall) {
				WndMgr.StartOneBottonPopup(OneBtnPopupIndex.NOT_AVAILABLE_DURING_CALL);
			} else {
				StateMgr.Start_Online_Status_State();
			}
			break;
		case this.ChangePasswordBtn:
			StateMgr.Start_Change_Password_State();
			break;
		case this.FullNameBtn:
		case this.MoodMsgBtn:
		case this.EmailBtn:
		case this.CityBtn:
		case this.StateProvinceBtn:
			this.startTextInput();
			break;

		case this.CountryRegionBtn:
			this.showCountryList();
			break;

		case this.HomePhoneBtn:
			if(IsInCall) {
				WndMgr.StartOneBottonPopup(OneBtnPopupIndex.NOT_AVAILABLE_DURING_CALL);
			} else {
				this.PhoneType = 1;
				StateMgr.Start_ProfilePhoneNumberSet_State();
			}
			break;
		case this.OfficePhoneBtn:
			if(IsInCall) {
				WndMgr.StartOneBottonPopup(OneBtnPopupIndex.NOT_AVAILABLE_DURING_CALL);
			} else {
				this.PhoneType = 2;
				StateMgr.Start_ProfilePhoneNumberSet_State();
			}
			break;
		case this.MobilePhoneBtn:
			if(IsInCall) {
				WndMgr.StartOneBottonPopup(OneBtnPopupIndex.NOT_AVAILABLE_DURING_CALL);
			} else {
				this.PhoneType = 3;
				StateMgr.Start_ProfilePhoneNumberSet_State();
			}
			break;

		case this.GenderBtn:
			StateMgr.Start_Gender_State();
			break;
		case this.BirthDateBtn:
			StateMgr.Start_BirthDate_State();
			break;

	}
}

SceneListMainProfile.prototype.ReturnToMain = function() {
    WndMgr.ReturnSubToMain();
}
SceneListMainProfile.prototype.processLeftKey = function() {
	alert("SceneListMainProfile.processLeftKey() ");
	WndMgr.ReturnSubToMain();
}

SceneListMainProfile.prototype.processReturnKey = function() {
	alert("SceneListMainProfile.processReturnKey() ");
	WndMgr.ReturnSubToMainContact();
}

SceneListMainProfile.prototype.processRedKey = function() {
	alert("SceneListMainProfile.processRedKey() ");

	StateMgr.Start_Signout_State();
}

SceneListMainProfile.prototype.processExitKey = function() {
	alert("SceneListMainLiveCall.processExitKey() ");

	StateMgr.Start_Exit_State(false);
}

SceneListMainProfile.prototype.processClickEvent = function(obj) {
	alert("SceneListMainProfile.processClickEvent() ");
	if(this.FlagFocus == false) {
		sf.scene.get('ListMain').selectOnCurrHighlight();
	}
	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();
	if(currentHighlight != obj) {

		this.highlight(obj);
	}

	this.processEnterKey();
}
SceneListMainProfile.prototype.processMouseOver = function(obj) {
	if(this.FlagFocus == false) {
		sf.scene.get('ListMain').selectOnCurrHighlight();
	}
	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();
	if(currentHighlight != obj) {
		this.highlight(obj);
	}
}
SceneListMainProfile.prototype.startTextInput = function() {
	alert("SceneListMainProfile.startTextInput() ");
	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();

	WndMgr.StartTextEditor(currentHighlight, "ListMainProfile", null);
}

SceneListMainProfile.prototype.highlight = function(obj) {
	if(obj)
		alert("SceneListMainProfile.highlight() " + obj.GetObjId());

	if(obj == this.BirthDateBtn) {
		this.highlightBirthDate(true);
	} else {
		this.highlightBirthDate(false);
	}
	this.ListMainProfileView.setCurrenHighlight(obj);
}

SceneListMainProfile.prototype.setDestroyFlag = function(destroy_flag) {
	this.destroyFlag = destroy_flag;
}

SceneListMainProfile.prototype.CheckPageChange = function() {
	alert("SceneListMainProfile.CheckPageChange() ");
	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();
	var curPage = 0;
	switch(currentHighlight) {
		//plugin check, ProcMgr.GetMyPwd().length check->ref. settingscene
		case this.ChangePictureBtn:
		case this.OnlineStatusBtn:
		case this.FullNameBtn:
		case this.MoodMsgBtn:
		case this.ChangePasswordBtn:
			curPage = 0;
			break;
		case this.EmailBtn:
		case this.CountryRegionBtn:
		case this.HomePhoneBtn:
		case this.OfficePhoneBtn:
		case this.MobilePhoneBtn:
		case this.StateProvinceBtn:
			curPage = 1;
			break;
		case this.CityBtn:
		case this.GenderBtn:
		case this.BirthDateBtn:
			curPage = 2;
			break;
	}

	this.ChangePageNum(curPage);
}

SceneListMainProfile.prototype.ChangePageNum = function(num) {
	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();
	if(this.pageNum != num) {
		this.ListMainProfilePage[num].visibleObj();
		this.ListMainProfilePage[this.pageNum].hiddenObj();
		this.UpdateVisible(num);
		this.pageNum = num;
		this.ScrollBar.SetCurrentNum(num + 1);
		this.ScrollBar.ResetScrollBar();
		this.UpdatePageData(num);
	}

}
/*for mouse click*/
SceneListMainProfile.prototype.GoToPageNum = function(num) {
	alert("SceneListMainProfile.GoToPageNum(" + num + ")");

	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();
	if(this.pageNum != num) {
		this.ListMainProfilePage[num].visibleObj();
		this.ListMainProfilePage[this.pageNum].hiddenObj();
		this.UpdateVisible(num);
		switch(num) {
			case 0:
				this.highlight(this.ChangePictureBtn);
				break;
			case 1:
				this.highlight(this.EmailBtn);
				break;
			case 2:
				this.highlight(this.CityBtn);
				break;
		}
		this.pageNum = num;
	}
	this.ScrollBar.SetCurrentNum(num + 1);
	this.ScrollBar.ResetScrollBar();
	this.UpdatePageData(num);

}
/*for mouse click*/
SceneListMainProfile.prototype.ChangeArrow = function(n) {
	alert('SceneListMainProfile.ChangeArrow()');
	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();
	if(currentHighlight == null) {
		sf.scene.get("ListMain").processEnterKey();
	}
	var curPage = this.pageNum;
	if(n == 1) {
		if(--curPage < 0)
			curPage = 0;
	} else {
		if(++curPage > 2)
			curPage = 2;
	}
	this.GoToPageNum(curPage);
}

SceneListMainProfile.prototype.highlightBirthDate = function(focus) {

	if(focus == false) {// nomal
		this.BirthDateDay.SetTextStyle("list_main_profile_btn_text_style");
		this.BirthDateSlash[0].SetTextStyle("list_main_profile_btn_text_style");
		this.BirthDateMonth.SetTextStyle("list_main_profile_btn_text_style");
		this.BirthDateSlash[1].SetTextStyle("list_main_profile_btn_text_style");
		this.BirthDateYear.SetTextStyle("list_main_profile_btn_text_style");
	} else if(focus == true) {//focus
		this.BirthDateDay.SetTextStyle("list_main_profile_btn_text_focus_style");
		this.BirthDateSlash[0].SetTextStyle("list_main_profile_btn_text_focus_style");
		this.BirthDateMonth.SetTextStyle("list_main_profile_btn_text_focus_style");
		this.BirthDateSlash[1].SetTextStyle("list_main_profile_btn_text_focus_style");
		this.BirthDateYear.SetTextStyle("list_main_profile_btn_text_focus_style");
	}
}

SceneListMainProfile.prototype.ImeTextEnd = function() {
	alert("SceneListMainProfile.ImeTextEnd()");

	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();
	switch(currentHighlight) {
		case this.FullNameBtn:
			alert("fullnamebtn before data : " + this.Init_FullName + " changed data : " + this.FullNameBtn.GetText());
			if(this.Init_FullName != this.FullNameBtn.GetText()) {

				PluginAPIMgr.SetFullName(this.FullNameBtn.GetText());
				sf.scene.get("ListMain").updateSkypeName();
				this.Init_FullName = this.FullNameBtn.GetText();

			}
			break;
		case this.MoodMsgBtn:
			alert("MoodMsgBtn before data : " + this.Init_MoodMsg + " changed data : " + this.MoodMsgBtn.GetText());
			if(this.Init_MoodMsg != this.MoodMsgBtn.GetText()) {

				PluginAPIMgr.SetMoodMsg(this.MoodMsgBtn.GetText());
				sf.scene.get("ListMain").updateMoodMessage();
				this.Init_MoodMsg = this.MoodMsgBtn.GetText();
			}
			break;
		case this.EmailBtn:
			alert("EmailBtn before data : " + this.Init_Email + " changed data : " + this.EmailBtn.GetText());
			if(this.Init_Email != this.EmailBtn.GetText()) {
				this.EmailSaveStep();
			}
			break;
		case this.StateProvinceBtn:
			alert("StateProvinceBtn before data : " + this.Init_StateProvince + " changed data : " + this.StateProvinceBtn.GetText());
			if(this.Init_StateProvince != this.StateProvinceBtn.GetText()) {
				PluginAPIMgr.SetProvince(this.StateProvinceBtn.GetText());
				this.Init_StateProvince = this.StateProvinceBtn.GetText();
			}
			break;
		case this.CityBtn:
			alert("CityBtn before data : " + this.Init_City + " changed data : " + this.CityBtn.GetText());
			if(this.Init_City != this.CityBtn.GetText()) {
				PluginAPIMgr.SetCity(this.CityBtn.GetText());
				this.Init_City = this.CityBtn.GetText();
			}
			break;
	}
}
SceneListMainProfile.prototype.EmailSaveStep = function() {
	alert("SceneListMainProfile.EmailSaveStep() ");
	WndMgr.StartLoading(LoadingTypeIndex.WAIT);
	if(PluginAPIMgr.IsValidEmail(this.EmailBtn.GetText()) == 1) {// valid
		WndMgr.StopLoading();
		WndMgr.StartOneBottonPopup(OneBtnPopupIndex.LIST_MAIN_PROFILE_OK);
		this.Init_Email = this.EmailBtn.GetText();
	} else {
		WndMgr.StopLoading();
		WndMgr.StartOneBottonPopup(OneBtnPopupIndex.LIST_MAIN_PROFILE_INVALID_EMAIL);
		this.SetEmail(this.Init_Email);
	}
}
SceneListMainProfile.prototype.showCountryList = function() {
	alert("SceneListMainProfile.showCountryList() ");

	var this_ = sf.scene.get("ListMainProfile");
	var Index = g_Data.GetCountryIndexWithCode(this_.Init_CountryRegion);
	sf.scene.get("CountryFlagList").Init(FLAG_LIST_TYPE.LIST_MAIN_CALL, 'ListMainProfile', this_.SetCountryList, null);
	sf.scene.get("CountryFlagList").SetCurIndex(Index);
	sf.scene.show('CountryFlagList');

	setTimeout("CloseTimerCF()", 0);
	CloseTimerCF = function() {
		sf.scene.focus('CountryFlagList');
	}
}

SceneListMainProfile.prototype.SetCountryList = function() {
	alert("SceneListMainProfile.SetCountryList() ");
	var Scene = sf.scene.get("CountryFlagList");
	var this_ = sf.scene.get("ListMainProfile");

	var CountryCode = Scene.GetCountryCode();
	var CountryName = Scene.GetCountryName();

	if(this_.Init_CountryCode != CountryCode) {
		PluginAPIMgr.SetCountryCode(CountryCode);
		this_.SetCountryRegion(CountryCode, CountryName);
	}
}

SceneListMainProfile.prototype.showListMainProfile = function() {//init
	alert("SceneListMainProfile.showListMainProfile()");

	var currentHighlight = this.ListMainProfileView.getCurrentHighlight();
	if(currentHighlight == this.BirthDateBtn) {
		this.highlightBirthDate(true);
	} else {
		this.highlightBirthDate(false);
	}
	this.ChangePictureBtn.SetFgImage("");
	this.OnlineStatusBtn.SetText("");
	this.OnlineStatusBtn.SetBgIcon(0, "");
	this.OnlineStatusBtn.SetBgIcon(1, "");

	this.FullNameBtn.SetText("");
	this.MoodMsgBtn.SetText("");

	this.CityBtn.SetText("");
	this.GenderBtn.SetText("");
	this.BirthDateDay.SetText("");
	this.BirthDateSlash[0].SetText("");
	this.BirthDateMonth.SetText("");
	this.BirthDateSlash[1].SetText("");
	this.BirthDateYear.SetText("");

	this.EmailBtn.SetText("");
	this.CountryRegionBtn.SetText("");
	this.StateProvinceBtn.SetText("");
	this.CountryRegionBtn.SetBgIcon(0, "");
	this.CountryRegionBtn.SetBgIcon(1, "");
	this.HomePhoneBtn.SetText("");
	this.OfficePhoneBtn.SetText("");
	this.MobilePhoneBtn.SetText("");
	this.HomePhoneBtn.SetBgIcon(0, "");
	this.HomePhoneBtn.SetBgIcon(1, "");
	this.OfficePhoneBtn.SetBgIcon(0, "");
	this.OfficePhoneBtn.SetBgIcon(1, "");
	this.MobilePhoneBtn.SetBgIcon(0, "");
	this.MobilePhoneBtn.SetBgIcon(1, "");

}
SceneListMainProfile.prototype.UpdatePicture = function(){
	alert("SceneListMainProfile.UpdatePicture()");
	this.Init_PictureImg = PluginAPIMgr.GetMyAvataImageForMain();
	this.SetPictureImg(this.Init_PictureImg);
}
SceneListMainProfile.prototype.UpdatePageData = function(pageNum) {
	alert("SceneListMainProfile.UpdatePageData() -- page " + pageNum);
	switch(pageNum) {
		case 0:
			this.ChangePictureBtn.SetFgImage("");
			this.OnlineStatusBtn.SetText("");
			this.OnlineStatusBtn.SetBgIcon(0, "");
			this.OnlineStatusBtn.SetBgIcon(1, "");

			this.FullNameBtn.SetText("");
			this.MoodMsgBtn.SetText("");
			this.MyCredit = PluginAPIMgr.GetMyCredit();
			this.ExpireDate = PluginAPIMgr.GetMyVoiceMailExpireDate();

			this.UpdateVisible(this.pageNum);

			this.Init_PictureImg = PluginAPIMgr.GetMyAvataImageForMain();
			this.SetPictureImg(this.Init_PictureImg);

			this.Init_OnlineStatusEnum = PluginAPIMgr.GetMyOnlineState();
			this.SetOnlineStatus(this.Init_OnlineStatusEnum);

			this.Init_FullName = PluginAPIMgr.GetMyFullName();
			this.SetFullName(this.Init_FullName);

			this.Init_MoodMsg = PluginAPIMgr.GetMyMoodMsg();
			this.SetMoodMsg(this.Init_MoodMsg);
			this.UpArrow.hiddenObj();
			this.DownArrow.visibleObj();
			break;
		case 1:
			this.EmailBtn.SetText("");
			this.CountryRegionBtn.SetText("");
			this.StateProvinceBtn.SetText("");
			this.CountryRegionBtn.SetBgIcon(0, "");
			this.CountryRegionBtn.SetBgIcon(1, "");
			this.HomePhoneBtn.SetText("");
			this.OfficePhoneBtn.SetText("");
			this.MobilePhoneBtn.SetText("");
			this.HomePhoneBtn.SetBgIcon(0, "");
			this.HomePhoneBtn.SetBgIcon(1, "");
			this.OfficePhoneBtn.SetBgIcon(0, "");
			this.OfficePhoneBtn.SetBgIcon(1, "");
			this.MobilePhoneBtn.SetBgIcon(0, "");
			this.MobilePhoneBtn.SetBgIcon(1, "");

			this.Init_Email = PluginAPIMgr.GetMyEmail();
			this.SetEmail(this.Init_Email);

			this.Init_CountryRegion = PluginAPIMgr.GetMyCountryCode();
			this.Init_CountryName = PluginAPIMgr.GetMyCountryName(this.Init_CountryRegion);
			this.SetCountryRegion(this.Init_CountryRegion, this.Init_CountryName);

			this.Init_HomePhone = PluginAPIMgr.GetMyHomePhone();
			this.SetHomePhone(this.Init_HomePhone);

			this.Init_OfficePhone = PluginAPIMgr.GetMyOfficePhone();
			this.SetOfficePhone(this.Init_OfficePhone);

			this.Init_MobilePhone = PluginAPIMgr.GetMyMobilePhone();
			this.SetMobilePhone(this.Init_MobilePhone);

			this.Init_HomePhoneCountryCode = PluginAPIMgr.FindCountryCodeByNumber(this.Init_HomePhone);
			this.SetHomePhoneCountryCode(this.Init_HomePhoneCountryCode);

			this.Init_OfficePhoneCountryCode = PluginAPIMgr.FindCountryCodeByNumber(this.Init_OfficePhone);
			this.SetOfficePhoneCountryCode(this.Init_OfficePhoneCountryCode);

			this.Init_MobilePhoneCountryCode = PluginAPIMgr.FindCountryCodeByNumber(this.Init_MobilePhone);
			this.SetMobilePhoneCountryCode(this.Init_MobilePhoneCountryCode);

			this.Init_StateProvince = PluginAPIMgr.GetMyProvince();
			this.SetStateProvince(this.Init_StateProvince);
			this.UpArrow.visibleObj();
			this.DownArrow.visibleObj();
			break;
		case 2:
			this.CityBtn.SetText("");
			this.GenderBtn.SetText("");
			this.BirthDateDay.SetText("");
			this.BirthDateSlash[0].SetText("");
			this.BirthDateMonth.SetText("");
			this.BirthDateSlash[1].SetText("");
			this.BirthDateYear.SetText("");

			this.Init_City = PluginAPIMgr.GetMyCity();
			this.SetCity(this.Init_City);

			this.Init_Gender = PluginAPIMgr.GetMyGender();
			this.SetGender(this.Init_Gender);

			this.Init_BirthDate = PluginAPIMgr.GetMyBirthDay();
			this.SetBirthDate(this.Init_BirthDate);
			this.UpArrow.visibleObj();
			this.DownArrow.hiddenObj();
			break;
	}
}
/* update function*/
SceneListMainProfile.prototype.UpdateVisible = function(num) {
	this.SkypeCreditLabel.hiddenObj();
	this.VoiceMailExpireLabel.hiddenObj();
	var reverse = ResMgr.isReverseLanguage();
	var chk = false;
	if(num == 0) {
		if(!(this.MyCredit == null || this.MyCredit == 0)) {
			this.SkypeCreditLabel.visibleObj();
			chk = true;
		}
		if(!(this.ExpireDate == null || this.ExpireDate.length == 0)) {
			this.VoiceMailExpireLabel.visibleObj();
			chk = true;
		}
		if(chk) {
			var fontsize = $("#list_main_profile_skype_credit_label").css("font-size");
			$("body").append("<div id='profile_text_length_check'></div>");
			$('#profile_text_length_check').css({
				'position' : 'absolute',
				'left' : '0px',
				'font-size' : fontsize,
				'visibility' : 'hidden'
			});
			var c_label_w = $("#list_main_profile_skype_credit_label").width() + 1;
			$('#profile_text_length_check').text(TV_SID_SKYPE_CREDIT + " : " + this.MyCredit);
			var c_text_w = $("#profile_text_length_check").width() + 1;

			var v_label_w = $("#list_main_profile_voicemail_expire_label").width() + 1;
			$("#profile_text_length_check").text(TV_SID_VOICE_MAIL_EXPIRE + " : " + this.ExpireDate);
			var v_text_w = $("#profile_text_length_check").width() + 1;

			$("#profile_text_length_check").remove();

			if(document.getElementById("list_main_profile_voicemail_expire_value") == null)
				$("#list_main_profile_voicemail_expire_label").append("<div id='list_main_profile_voicemail_expire_value'>" + this.ExpireDate + "</div>");
			if(document.getElementById("list_main_profile_skype_credit_value") == null)
				$("#list_main_profile_skype_credit_label").append("<div id='list_main_profile_skype_credit_value'>" + this.MyCredit + "</div>");
			/*
			 alert("c_label_w : " + c_label_w);
			 alert("c_text_w : " + c_text_w);
			 alert("v_label_w : " + v_label_w);
			 alert("v_text_w : " + v_text_w);
			 */
			if(c_label_w < c_text_w) {// 2 row
				$("#list_main_profile_skype_credit_value").css("display", "inherit");
				$("#list_main_profile_voicemail_expire_label").css("top", "120px");
			} else {// 1 row
				$("#list_main_profile_skype_credit_value").css("display", "inline-block");
				$("#list_main_profile_voicemail_expire_label").css("top", "92px");
			}
			if(v_label_w < v_text_w) {
				$("#list_main_profile_voicemail_expire_value").css("display", "inherit");
			} else {
				$("#list_main_profile_voicemail_expire_value").css("display", "inline-block");

			}
		}
	}
}
/* Set & Get Function */
SceneListMainProfile.prototype.GetPictureImg = function(imgUrl) {
	return this.Init_PictureImg;
}
SceneListMainProfile.prototype.SetPictureImg = function(imgUrl) {
	this.Init_PictureImg = imgUrl;
	this.ChangePictureBtn.SetFgImage(this.Init_PictureImg);
}
SceneListMainProfile.prototype.GetOnlineStatus = function() {
	return this.Init_OnlineStatusEnum;
}
SceneListMainProfile.prototype.SetOnlineStatus = function(value) {
	this.Init_OnlineStatusEnum = value;
	var status_icon = null;
	var status_select_icon = null;
	switch(this.Init_OnlineStatusEnum) {
		case ENUM_ACCOUNT_AVAILABILITY.ONLINE:
			this.Init_OnlineStatus = IDWS_MOIP_SETTING_ONLINE;
			status_icon = g_Image.IMAGE_LIST_MAIN_PROFILE_ONLINE_STATUS_ICON;
			status_select_icon = g_Image.IMAGE_LIST_MAIN_PROFILE_ONLINE_STATUS_ICON;
			break;
		case ENUM_ACCOUNT_AVAILABILITY.AWAY:
			this.Init_OnlineStatus = IDWS_MOIP_SETTING_AWAY;
			status_icon = g_Image.IMAGE_LIST_MAIN_PROFILE_AWAY_ICON;
			status_select_icon = g_Image.IMAGE_LIST_MAIN_PROFILE_AWAY_ICON;
			break;
		case ENUM_ACCOUNT_AVAILABILITY.DO_NOT_DISTURB:
			this.Init_OnlineStatus = IDWS_MOIP_SETTING_DO_NOT_DISTURB;
			status_icon = g_Image.IMAGE_LIST_MAIN_PROFILE_DONOTDISTURB_ICON;
			status_select_icon = g_Image.IMAGE_LIST_MAIN_PROFILE_DONOTDISTURB_ICON;
			break;
		case ENUM_ACCOUNT_AVAILABILITY.INVISIBLE:
			this.Init_OnlineStatus = IDWS_MOIP_SETTING_INVISIBLE;
			status_icon = g_Image.IMAGE_LIST_MAIN_PROFILE_INVISIBLE_SELECT_ICON;
			status_select_icon = g_Image.IMAGE_LIST_MAIN_PROFILE_INVISIBLE_ICON;
			break;
		case ENUM_ACCOUNT_AVAILABILITY.OFFLINE:
			this.Init_OnlineStatus = TV_SID_OFFLINE;
			status_icon = g_Image.IMAGE_LIST_MAIN_PROFILE_SIGNOUT_SELECT_ICON;
			status_select_icon = g_Image.IMAGE_LIST_MAIN_PROFILE_SIGNOUT_ICON;
			break;
		default:
			this.Init_OnlineStatus = TV_SID_OFFLINE;
			status_icon = g_Image.IMAGE_LIST_MAIN_PROFILE_SIGNOUT_SELECT_ICON;
			status_select_icon = g_Image.IMAGE_LIST_MAIN_PROFILE_SIGNOUT_ICON;
			break;
	}
	this.OnlineStatusBtn.SetBgIcon(0, status_icon);
	this.OnlineStatusBtn.SetBgIcon(1, status_select_icon);
	this.OnlineStatusBtn.SetText(this.Init_OnlineStatus);
}

SceneListMainProfile.prototype.SetFullName = function(value) {
	this.Init_FullName = value;
	this.FullNameBtn.SetText(this.Init_FullName);
}
SceneListMainProfile.prototype.SetMoodMsg = function(value) {
	this.Init_MoodMsg = value;
	this.MoodMsgBtn.SetText(this.Init_MoodMsg);
}
SceneListMainProfile.prototype.SetEmail = function(value) {
	this.Init_Email = value;
	this.EmailBtn.SetText(this.Init_Email);
}
SceneListMainProfile.prototype.SetCity = function(value) {
	this.Init_City = value;
	this.CityBtn.SetText(this.Init_City);
}
SceneListMainProfile.prototype.SetCountryRegion = function(value1, value2) {
	this.Init_CountryRegion = value1;
	this.Init_CountryName = value2;
	if(this.Init_CountryRegion != null && this.Init_CountryRegion != "") {
		this.CountryRegionBtn.SetBgIcon(0, g_Image.base_flag_image_path + this.Init_CountryRegion.toUpperCase() + ".png");
		this.CountryRegionBtn.SetBgIcon(1, g_Image.base_flag_image_path + this.Init_CountryRegion.toUpperCase() + ".png");
		this.CountryRegionBtn.SetText(this.Init_CountryName);
	}
}

SceneListMainProfile.prototype.SetStateProvince = function(value) {
	this.Init_StateProvince = value;
	this.StateProvinceBtn.SetText(this.Init_StateProvince);
}
SceneListMainProfile.prototype.GetBirthDate = function() {
	return this.Init_BirthDate;
}
SceneListMainProfile.prototype.SetBirthDate = function(value) {
	this.Init_BirthDate = value;
	var date_len = 0;
	if(this.Init_BirthDate != null) {
		date_len = this.Init_BirthDate.length;
		if(date_len >= 8) {
			this.Init_BirthDateDay = this.Init_BirthDate.substring(date_len - 2, date_len);
			this.Init_BirthDateMonth = this.Init_BirthDate.substring(date_len - 4, date_len - 2);
			this.Init_BirthDateYear = this.Init_BirthDate.substring(date_len - 8, date_len - 4);
			this.BirthDateDay.SetText(this.Init_BirthDateDay);
			this.BirthDateMonth.SetText(this.Init_BirthDateMonth);
			this.BirthDateYear.SetText(this.Init_BirthDateYear);
		}
		this.BirthDateSlash[0].SetText("/");
		this.BirthDateSlash[1].SetText("/");
	}
}

SceneListMainProfile.prototype.GetHomePhoneCountryCode = function() {
	return this.Init_HomePhoneCountryCode;
}
SceneListMainProfile.prototype.SetHomePhoneCountryCode = function(value) {
	this.Init_HomePhoneCountryCode = value;
	if(this.Init_HomePhoneCountryCode != null && this.Init_HomePhoneCountryCode !="") {
		this.HomePhoneBtn.SetBgIcon(0, g_Image.base_flag_image_path + this.Init_HomePhoneCountryCode.toUpperCase() + ".png");
		this.HomePhoneBtn.SetBgIcon(1, g_Image.base_flag_image_path + this.Init_HomePhoneCountryCode.toUpperCase() + ".png");
	} else {
		this.HomePhoneBtn.SetBgIcon(0, "");
		this.HomePhoneBtn.SetBgIcon(1, "");
	}
}

SceneListMainProfile.prototype.GetHomePhone = function() {
	return this.Init_HomePhone;
}
SceneListMainProfile.prototype.SetHomePhone = function(value) {
	this.Init_HomePhone = value;
	if(this.Init_HomePhone != null) {
		this.HomePhoneBtn.SetText(this.Init_HomePhone);
	}
}

SceneListMainProfile.prototype.GetOfficePhoneCountryCode = function() {
	return this.Init_OfficePhoneCountryCode;
}
SceneListMainProfile.prototype.SetOfficePhoneCountryCode = function(value) {
	this.Init_OfficePhoneCountryCode = value;
	if(this.Init_OfficePhoneCountryCode != null && this.Init_OfficePhoneCountryCode != "") {
		this.OfficePhoneBtn.SetBgIcon(0, g_Image.base_flag_image_path + this.Init_OfficePhoneCountryCode.toUpperCase() + ".png");
		this.OfficePhoneBtn.SetBgIcon(1, g_Image.base_flag_image_path + this.Init_OfficePhoneCountryCode.toUpperCase() + ".png");
	} else {
		this.OfficePhoneBtn.SetBgIcon(0, "");
		this.OfficePhoneBtn.SetBgIcon(1, "");
	}
}

SceneListMainProfile.prototype.GetOfficePhone = function() {
	return this.Init_OfficePhone;
}
SceneListMainProfile.prototype.SetOfficePhone = function(value) {
	this.Init_OfficePhone = value;
	if(this.Init_OfficePhone != null) {
		this.OfficePhoneBtn.SetText(this.Init_OfficePhone);
	}
}

SceneListMainProfile.prototype.GetMobilePhoneCountryCode = function() {
	return this.Init_MobilePhoneCountryCode;
}
SceneListMainProfile.prototype.SetMobilePhoneCountryCode = function(value) {
	this.Init_MobilePhoneCountryCode = value;
	if(this.Init_MobilePhoneCountryCode != null && this.Init_MobilePhoneCountryCode != "") {
		this.MobilePhoneBtn.SetBgIcon(0, g_Image.base_flag_image_path + this.Init_MobilePhoneCountryCode.toUpperCase() + ".png");
		this.MobilePhoneBtn.SetBgIcon(1, g_Image.base_flag_image_path + this.Init_MobilePhoneCountryCode.toUpperCase() + ".png");
	} else {
		this.MobilePhoneBtn.SetBgIcon(0, "");
		this.MobilePhoneBtn.SetBgIcon(1, "");
	}
}

SceneListMainProfile.prototype.GetMobilePhone = function() {
	return this.Init_MobilePhone;
}
SceneListMainProfile.prototype.SetMobilePhone = function(value) {
	this.Init_MobilePhone = value;
	if(this.Init_MobilePhone != null) {
		this.MobilePhoneBtn.SetText(this.Init_MobilePhone);

	}
}

SceneListMainProfile.prototype.GetGender = function() {
	return this.Init_Gender;
}
SceneListMainProfile.prototype.SetGender = function(value) {
	this.Init_Gender = value;
	if(this.Init_Gender == "1") {
		var gender_string = SID_MALE_KR_MAN;
	} else if(this.Init_Gender == "2") {
		var gender_string = SID_FEMALE_KR_WOMAN;
	} else {
		var gender_string = "";
	}

	this.GenderBtn.SetText(gender_string);
}

SceneListMainProfile.prototype.GetPhoneType = function() {
	return this.PhoneType;
}
SceneListMainProfile.prototype.create = function() {

	alert("SceneListMainProfile.create()");
	this.ListMainProfileView = new View("ListMainProfile");

	var this_ = this;
	var clickCF = function(obj) {
		this_.processClickEvent(obj);
	};
	this.ListMainProfilePage[0] = new View("list_main_profile_page_1");
	// this.ListMainProfilePage[0].hiddenObj();
	this.ListMainProfilePage[1] = new View("list_main_profile_page_2");
	this.ListMainProfilePage[1].hiddenObj();
	this.ListMainProfilePage[2] = new View("list_main_profile_page_3");
	this.ListMainProfilePage[2].hiddenObj();

	var CurLangID = ResMgr.GetCurLanguage();
	
	//page 1 text label
	this.SkypeCreditLabel = new TextLayer("list_main_profile_skype_credit_label");
	this.SkypeCreditLabel.SetTextStyle("list_main_profile_text_style");
	this.SkypeCreditLabel.SetText(TV_SID_SKYPE_CREDIT + " :&nbsp;");

	this.VoiceMailExpireLabel = new TextLayer("list_main_profile_voicemail_expire_label");
	this.VoiceMailExpireLabel.SetTextStyle("list_main_profile_text_style");
	this.VoiceMailExpireLabel.SetText(TV_SID_VOICE_MAIL_EXPIRE + " :&nbsp;");
	if(CurLangID==ENUM_TV_LANGUAGE.AMH){
		$("#list_main_profile_voicemail_expire_label").css('width','340px');
	}else{
		$("#list_main_profile_voicemail_expire_label").css('width','300px');
	}

	this.StatusLabel = new TextLayer("list_main_profile_status_label");
	this.StatusLabel.SetTextStyle("list_main_profile_text_style");
	this.StatusLabel.SetText(IDWS_MOIP_SETTING_ONLINE_STATUS);

	this.FullNameLabel = new TextLayer("list_main_profile_full_name_label");
	this.FullNameLabel.SetTextStyle("list_main_profile_text_style");
	this.FullNameLabel.SetText(IDWS_MOIP_FULL_NAME);

	this.MoodMsgLabel = new TextLayer("list_main_profile_mood_message_label");
	this.MoodMsgLabel.SetTextStyle("list_main_profile_text_style");
	this.MoodMsgLabel.SetText(IDWS_MOIP_MOOD_MESSAGE);

	this.PasswordLabel = new TextLayer("list_main_profile_password_label");
	this.PasswordLabel.SetTextStyle("list_main_profile_text_style");
	this.PasswordLabel.SetText(SID_PASSWORD);
	//page2 text label
	this.EmailLabel = new TextLayer("list_main_profile_email_label");
	this.EmailLabel.SetTextStyle("list_main_profile_text_style");
	this.EmailLabel.SetText(IDWS_MOIP_E_MAIL);

	this.CountryRegionLabel = new TextLayer("list_main_profile_country_region_label");
	this.CountryRegionLabel.SetTextStyle("list_main_profile_text_style");
	this.CountryRegionLabel.SetText(IDWS_MOIP_SETTING_COUNTRY);

	this.HomePhoneLabel = new TextLayer("list_main_profile_home_phone_label");
	this.HomePhoneLabel.SetTextStyle("list_main_profile_text_style");
	this.HomePhoneLabel.SetText(IDWS_MOIP_HOME_PHONE);

	this.OfficePhoneLabel = new TextLayer("list_main_profile_office_phone_label");
	this.OfficePhoneLabel.SetTextStyle("list_main_profile_text_style");
	this.OfficePhoneLabel.SetText(IDWS_MOIP_OFFICE_PHONE);

	this.MobilePhoneLabel = new TextLayer("list_main_profile_mobile_phone_label");
	this.MobilePhoneLabel.SetTextStyle("list_main_profile_text_style");
	this.MobilePhoneLabel.SetText(IDWS_MOIP_MOBILE_PHONE);

	this.StateProvinceLabel = new TextLayer("list_main_profile_state_province_label");
	this.StateProvinceLabel.SetTextStyle("list_main_profile_text_style");
	this.StateProvinceLabel.SetText(IDWS_MOIP_SETTING_STATE);
	//page3 text label
	this.CityLabel = new TextLayer("list_main_profile_city_label");
	this.CityLabel.SetTextStyle("list_main_profile_text_style");
	this.CityLabel.SetText(IDWS_MOIP_SETTING_CITY);

	this.GenderLabel = new TextLayer("list_main_profile_gender_label");
	this.GenderLabel.SetTextStyle("list_main_profile_text_style");
	this.GenderLabel.SetText(IDWS_MOIP_SETTING_GENDER);

	this.BirthDateLabel = new TextLayer("list_main_profile_birth_date_label");
	this.BirthDateLabel.SetTextStyle("list_main_profile_text_style");
	this.BirthDateLabel.SetText(IDWS_MOIP_SETTING_BIRTH_DATE);

	this.BirthDateLabelDay = new TextLayer("list_main_profile_birth_date_day_text");
	this.BirthDateLabelDay.SetTextStyle("list_main_profile_birth_date_text_style");
	this.BirthDateLabelDay.SetText(SID_DAY);

	this.BirthDateLabelMonth = new TextLayer("list_main_profile_birth_date_month_text");
	this.BirthDateLabelMonth.SetTextStyle("list_main_profile_birth_date_text_style");
	this.BirthDateLabelMonth.SetText(SID_MONTH);

	this.BirthDateLabelYear = new TextLayer("list_main_profile_birth_date_year_text");
	this.BirthDateLabelYear.SetTextStyle("list_main_profile_birth_date_text_style");
	this.BirthDateLabelYear.SetText(SID_YEAR);

	//page 1 button
	this.ChangePictureBtn = new Button();
	this.ChangePictureBtn.SetImageObjId("list_main_profile_change_picture_btn");
	this.ChangePictureBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, "");
	this.ChangePictureBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_CHANGE_PICTURE_AVATAR_HIGHLIGHT);
	this.ChangePictureBtn.AppendFgImage("list_main_profile_change_picture_img", "4px", "4px", "114px", "114px");
	this.ChangePictureBtn.SetFgImage(g_Image.IMAGE_CHANGE_PICTURE_AVATAR);
	this.ChangePictureBtn.SetOnClickCallbackFunc(clickCF);

	this.OnlineStatusBtn = new Button();
	this.OnlineStatusBtn.SetImageObjId("list_main_profile_online_status_btn", 24);
	this.OnlineStatusBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.OnlineStatusBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.OnlineStatusBtn.SetIconObjId("list_main_profile_online_status_btn_icon");
	this.OnlineStatusBtn.SetTextObjId("list_main_profile_online_status_btn_text");
	this.OnlineStatusBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE, "list_main_profile_btn_text_style");
	this.OnlineStatusBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE, "list_main_profile_btn_text_focus_style");
	this.OnlineStatusBtn.SetOnClickCallbackFunc(clickCF);
	this.OnlineStatusBtn.SetReverseDisable(true);

	this.FullNameBtn = new Button();
	this.FullNameBtn.SetImageObjId("list_main_profile_full_name_btn", 24);
	this.FullNameBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.FullNameBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.FullNameBtn.SetTextObjId("list_main_profile_full_name_btn_text");

	this.FullNameBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE, "list_main_profile_btn_text_style");
	this.FullNameBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE, "list_main_profile_btn_text_focus_style");
	this.FullNameBtn.SetMaxStringLength(50);
	this.FullNameBtn.SetIsPlainText(true);
	this.FullNameBtn.SetReverseDisable(true);
	this.FullNameBtn.SetOverflowMarquee("list_main_profile_btn_text_focus_marquee_style");
	this.FullNameBtn.SetTextEditorInfo(IDWS_MOIP_INPUT_YOUR_FULL_NAME, IDWS_MOIP_INPUT_YOUR_FULL_NAME);
	this.FullNameBtn.SetOnClickCallbackFunc(clickCF);
	this.FullNameBtn.SetImeTextEndFunc(function() {
		this_.ImeTextEnd();
	});

	this.MoodMsgBtn = new Button();
	this.MoodMsgBtn.SetImageObjId("list_main_profile_mood_message_btn", 24);
	this.MoodMsgBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.MoodMsgBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.MoodMsgBtn.SetTextObjId("list_main_profile_mood_message_btn_text");
	this.MoodMsgBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE, "list_main_profile_btn_text_style");
	this.MoodMsgBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE, "list_main_profile_btn_text_focus_style");
	this.MoodMsgBtn.SetMaxStringLength(50);
	this.MoodMsgBtn.SetIsPlainText(true);
	this.MoodMsgBtn.SetReverseDisable(true);
	this.MoodMsgBtn.SetTextEditorInfo(TV_SID_ENTER_MOOD_MESSAGE, TV_SID_ENTER_MOOD_MESSAGE);
	this.MoodMsgBtn.SetOnClickCallbackFunc(clickCF);

	this.MoodMsgBtn.SetMaxStringLength(50);
	this.MoodMsgBtn.SetOverflowMarquee("list_main_profile_btn_text_focus_marquee_style");
	this.MoodMsgBtn.SetImeTextEndFunc(function() {
		this_.ImeTextEnd();
	});

	this.ChangePasswordBtn = new Button();
	this.ChangePasswordBtn.SetImageObjId("list_main_profile_password_btn", 24);
	this.ChangePasswordBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.ChangePasswordBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.ChangePasswordBtn.SetTextObjId("list_main_profile_password_btn_text");
	this.ChangePasswordBtn.SetText(IDWS_MOIP_CHANGE_PASS);
	this.ChangePasswordBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE, "list_main_profile_btn_text_style");
	this.ChangePasswordBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE, "list_main_profile_btn_text_focus_style");
	this.ChangePasswordBtn.SetOnClickCallbackFunc(clickCF);

	// page 2 button
	this.EmailBtn = new Button();
	this.EmailBtn.SetImageObjId("list_main_profile_email_btn", 24);
	this.EmailBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.EmailBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.EmailBtn.SetTextObjId("list_main_profile_email_btn_text");
	this.EmailBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE, "list_main_profile_btn_text_style");
	this.EmailBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE, "list_main_profile_btn_text_focus_style");
	this.EmailBtn.SetOnClickCallbackFunc(clickCF);
	this.EmailBtn.SetMaxStringLength(50);
	this.EmailBtn.SetIsPlainText(true);
	this.EmailBtn.SetFlagBlockSpace(true);
	this.EmailBtn.SetFlagIdType(true);
	this.EmailBtn.SetReverseDisable(true);
	this.EmailBtn.SetTextEditorInfo(IDWS_MOIP_OPTIONS_USER_PROFILE_KEYPAD_HELP_ENTER_EMAIL, IDWS_MOIP_OPTIONS_USER_PROFILE_KEYPAD_HELP_ENTER_EMAIL);
	this.EmailBtn.SetOverflowMarquee("list_main_profile_btn_text_focus_marquee_style");
	this.EmailBtn.SetImeTextEndFunc(function() {
		this_.ImeTextEnd();
	});

	this.CountryRegionBtn = new Button();
	this.CountryRegionBtn.SetImageObjId("list_main_profile_country_region_btn", 24);
	this.CountryRegionBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.CountryRegionBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.CountryRegionBtn.SetIconObjId("list_main_profile_country_region_btn_icon");
	this.CountryRegionBtn.SetTextObjId("list_main_profile_country_region_btn_text");
	this.CountryRegionBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE, "list_main_profile_btn_text_style");
	this.CountryRegionBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE, "list_main_profile_btn_text_focus_style");
	this.CountryRegionBtn.SetOnClickCallbackFunc(clickCF);
	this.CountryRegionBtn.SetOverflowMarquee("list_main_profile_btn_text_focus_marquee_style");
	this.CountryRegionBtn.SetReverseDisable(true);

	this.HomePhoneBtn = new Button();
	this.HomePhoneBtn.SetImageObjId("list_main_profile_home_phone_btn", 24);
	this.HomePhoneBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.HomePhoneBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.HomePhoneBtn.SetIconObjId("list_main_profile_home_phone_btn_icon");
	this.HomePhoneBtn.SetTextObjId("list_main_profile_home_phone_btn_text");
	this.HomePhoneBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE, "list_main_profile_btn_text_style");
	this.HomePhoneBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE, "list_main_profile_btn_text_focus_style");
	this.HomePhoneBtn.SetOnClickCallbackFunc(clickCF);
	this.HomePhoneBtn.SetOverflowMarquee("list_main_profile_btn_text_focus_marquee_style");
	this.HomePhoneBtn.SetReverseDisable(true);

	this.OfficePhoneBtn = new Button();
	this.OfficePhoneBtn.SetImageObjId("list_main_profile_office_phone_btn", 24);
	this.OfficePhoneBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.OfficePhoneBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.OfficePhoneBtn.SetIconObjId("list_main_profile_office_phone_btn_icon");
	this.OfficePhoneBtn.SetTextObjId("list_main_profile_office_phone_btn_text");
	this.OfficePhoneBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE, "list_main_profile_btn_text_style");
	this.OfficePhoneBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE, "list_main_profile_btn_text_focus_style");
	this.OfficePhoneBtn.SetOnClickCallbackFunc(clickCF);
	this.OfficePhoneBtn.SetOverflowMarquee("list_main_profile_btn_text_focus_marquee_style");
	this.OfficePhoneBtn.SetReverseDisable(true);

	this.MobilePhoneBtn = new Button();
	this.MobilePhoneBtn.SetImageObjId("list_main_profile_mobile_phone_btn", 24);
	this.MobilePhoneBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.MobilePhoneBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.MobilePhoneBtn.SetIconObjId("list_main_profile_mobile_phone_btn_icon");
	this.MobilePhoneBtn.SetTextObjId("list_main_profile_mobile_phone_btn_text");
	this.MobilePhoneBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE, "list_main_profile_btn_text_style");
	this.MobilePhoneBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE, "list_main_profile_btn_text_focus_style");
	this.MobilePhoneBtn.SetOnClickCallbackFunc(clickCF);
	this.MobilePhoneBtn.SetOverflowMarquee("list_main_profile_btn_text_focus_marquee_style");
	this.MobilePhoneBtn.SetReverseDisable(true);

	this.StateProvinceBtn = new Button();
	this.StateProvinceBtn.SetImageObjId("list_main_profile_state_province_btn", 24);
	this.StateProvinceBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.StateProvinceBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.StateProvinceBtn.SetTextObjId("list_main_profile_state_province_btn_text");
	this.StateProvinceBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE, "list_main_profile_btn_text_style");
	this.StateProvinceBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE, "list_main_profile_btn_text_focus_style");
	this.StateProvinceBtn.SetMaxStringLength(50);
	this.StateProvinceBtn.SetReverseDisable(true);
	this.StateProvinceBtn.SetIsPlainText(true);
	this.StateProvinceBtn.SetTextEditorInfo(TV_SID_ENTER_STATE_PROVINCE, TV_SID_ENTER_STATE_PROVINCE);
	this.StateProvinceBtn.SetOnClickCallbackFunc(clickCF);
	this.StateProvinceBtn.SetOverflowMarquee("list_main_profile_btn_text_focus_marquee_style");
	this.StateProvinceBtn.SetImeTextEndFunc(function() {
		this_.ImeTextEnd();
	});

	this.CityBtn = new Button();
	this.CityBtn.SetImageObjId("list_main_profile_city_btn", 24);
	this.CityBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.CityBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.CityBtn.SetTextObjId("list_main_profile_city_btn_text");
	this.CityBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE, "list_main_profile_btn_text_style");
	this.CityBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE, "list_main_profile_btn_text_focus_style");
	this.CityBtn.SetMaxStringLength(50);
	this.CityBtn.SetIsPlainText(true);
	this.CityBtn.SetReverseDisable(true);
	this.CityBtn.SetTextEditorInfo(TV_SID_ENTER_CITY, TV_SID_ENTER_CITY);
	this.CityBtn.SetOnClickCallbackFunc(clickCF);
	this.CityBtn.SetOverflowMarquee("list_main_profile_btn_text_focus_marquee_style");
	this.CityBtn.SetImeTextEndFunc(function() {
		this_.ImeTextEnd();
	});
	this.GenderBtn = new Button();
	this.GenderBtn.SetImageObjId("list_main_profile_gender_btn", 24);
	this.GenderBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.GenderBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.GenderBtn.SetTextObjId("list_main_profile_gender_btn_text");
	this.GenderBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_NORMAL_STYLE, "list_main_profile_btn_text_style");
	this.GenderBtn.SetTextStyle(BtnTextStyleIndex.BTN_TEXT_FOCUS_STYLE, "list_main_profile_btn_text_focus_style");
	this.GenderBtn.SetOnClickCallbackFunc(clickCF);
	this.GenderBtn.SetReverseDisable(true);

	this.BirthDateBtn = new Button();
	this.BirthDateBtn.SetImageObjId("list_main_profile_birth_date_btn", 24);
	this.BirthDateBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL);
	this.BirthDateBtn.SetBgImage(BtnImgIndex.BTN_NORMAL_FOCUS_IMG, g_Image.IMAGE_LIST_MAIN_PROFILE_BTN_NOMAL_FOCUS);
	this.BirthDateBtn.SetOnClickCallbackFunc(clickCF);

	this.BirthDateDay = new TextLayer("list_main_profile_birth_date_day");
	this.BirthDateSlash[0] = new TextLayer("list_main_profile_birth_date_slash_1");
	this.BirthDateMonth = new TextLayer("list_main_profile_birth_date_month");
	this.BirthDateSlash[1] = new TextLayer("list_main_profile_birth_date_slash_2");
	this.BirthDateYear = new TextLayer("list_main_profile_birth_date_year");

	this.highlightBirthDate(false);

	this.ScrollBar = new ScrollBar();
	this.ScrollBar.Create("list_main_profile_scrollbar");
	this.ScrollBar.SetShapeStyle(SCROLLBAR_SHAPE_STYLE.VERTICAL);

	this.ScrollBar.SetFirstImage(g_Image.IMAGE_LIST_MAIN_PROFILE_SCROLL_TOP);
	this.ScrollBar.SetSegmentImage(g_Image.IMAGE_LIST_MAIN_PROFILE_SCROLL_CENTER);
	this.ScrollBar.SetLastImage(g_Image.IMAGE_LIST_MAIN_PROFILE_SCROLL_BOTTOM);
	this.ScrollBar.SetPosition(3, 458, 0, 10);

	this.ScrollBar.SetBGImage(g_Image.IMAGE_LIST_MAIN_PROFILE_SCROLL_BG_TOP, g_Image.IMAGE_LIST_MAIN_PROFILE_SCROLL_BG_CENTER, g_Image.IMAGE_LIST_MAIN_PROFILE_SCROLL_BG_BOTTOM);
	this.ScrollBar.ResetScrollBar();

	this.UpArrow = new Label("list_main_profile_arrow_up", null);
	this.UpArrow.SetOnClickCallbackFunc(function() {
		this_.ChangeArrow(1);
	});

	this.DownArrow = new Label("list_main_profile_arrow_down", null);
	this.DownArrow.SetOnClickCallbackFunc(function() {this_.ChangeArrow(-1);	});
	this.UpArrow.SetOnMouseOutCallbackFunc(function() {this_.HideArrow();	});
	this.DownArrow.SetOnMouseOutCallbackFunc(function() {this_.HideArrow();	});
	this.UpArrow.SetOnMouseOverCallbackFunc(function() {
	    this_.UpArrow.SetBgImage(g_Image.IMAGE_LIST_MAIN_PROFILE_ARROW_UP_FOCUS);
		this_.DownArrow.SetBgImage(g_Image.IMAGE_LIST_MAIN_PROFILE_ARROW_DOWN);
	});
	this.DownArrow.SetOnMouseOverCallbackFunc(function() {
		this_.UpArrow.SetBgImage(g_Image.IMAGE_LIST_MAIN_PROFILE_ARROW_UP);
		this_.DownArrow.SetBgImage(g_Image.IMAGE_LIST_MAIN_PROFILE_ARROW_DOWN_FOCUS);
	});

	this.ListMainProfileView.SetOnMouseOverCallbackFunc(function() {	this_.ShowArrow();	});
	this.ListMainProfileView.SetOnMouseOutCallbackFunc(function() {		this_.HideArrow();	});
	//helpbar
	this.HelpBarData = {
		'red' : IDWS_MOIP_POPUP_EXIT_SIGN_OUT,
		'return' : SID_RETURN
	}
	HelpBar.changeHelpBarItems(this.HelpBarData);

	this.ChangePictureBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.OnlineStatusBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.FullNameBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.MoodMsgBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.ChangePasswordBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.EmailBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.CountryRegionBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.HomePhoneBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.OfficePhoneBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.MobilePhoneBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.StateProvinceBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.CityBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.GenderBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});
	this.BirthDateBtn.SetOnMouseOverCallbackFunc(function(obj) {		this_.processMouseOver(obj);	});	
	
	var tmpDiv = document.getElementById("ListMainProfile");
    tmpDiv.onmousewheel = function() {
        if(this_.WheelOperation == false) {
            this_.WheelOperation = true;
            PluginAPIMgr.StartOSDTimer("700", function() {
                this_.timerCallback();
            }, ENUM_TIMER_TYPE.POPUP_WND);

            if(event.wheelDelta > 0) {
                //alert("Up Up");
                this_.ChangeArrow(1);
            } else {
                //alert("Down Down");
                this_.ChangeArrow(-1);
            }
        }
    };
}
SceneListMainProfile.prototype.timerCallback = function() {
    this.WheelOperation = false;
}
SceneListMainProfile.prototype.ShowArrow = function() {
	this.DownArrow.SetBgImage(g_Image.IMAGE_LIST_MAIN_PROFILE_ARROW_DOWN);
	this.UpArrow.SetBgImage(g_Image.IMAGE_LIST_MAIN_PROFILE_ARROW_UP);
}
SceneListMainProfile.prototype.HideArrow = function() {
	this.UpArrow.SetBgImage(" ");
	this.DownArrow.SetBgImage(" ");
}