

function HistoryItem () {
    
    //this.CurHighlightButton = CONTACT_MBUTTON.NO_SELECT;
        
	this.NameLayerIndex         = -1;
	this.TimeLayerIndex			= -1;
	this.BoxLayerIndex			= -1;		
	this.AvatarLayerIndex        = -1;
	this.OnlieStatusLayerIndex  = -1;
	this.CallStatusLayerIndex	= -1;
	//this.VMDurationLayerIndex	= -1;
		
	this.Identity	 	= null;
	this.IdentityName 	= null;
	this.DisplayName	= null;
	
    this.BoxStyle		= new Array(ITEM_STATE.MAX);   
    this.AvatarStyle	= new Array(ITEM_STATE.MAX);
    this.TimeStyle		= new Array(ITEM_STATE.MAX);
	this.OnlineStyle	= new Array(ITEM_STATE.MAX);	
	this.NameStyle		= new Array(ITEM_STATE.MAX);
	this.StatusStyle	= new Array(ITEM_STATE.MAX);
	
	this.NameMarqueeStyle		= null;
	this.NameMarqueeCheckerDiv	= null;	
		
	this.AvatarType		= null;	
	this.VMDuration		= null;
	this.StatusImg		= null;
	
	this.DataStatus = null;
	
    ListItem.call(this);
}

HistoryItem.prototype = new ListItem(); 


HistoryItem.prototype.Create = function(eName) {
    
    alert("HistoryItem.Create()");
	
    this.CreateBG(eName);
	this.CreateName(eName);	
    this.CreateTime(eName);	
    this.CreateBox(eName);	
    this.CreateAvatar(eName);    
    this.CreateCallStatus(eName);
	this.CreateOnlineStatus(eName);
	//this.CreateVMDuration(eName);

    if(this.ItemID % 2 == 1){
        this.SetBgImage(ITEM_STATE.NORMAL,g_Image.IMAGE_LIST_MAIN_CONTACT_LIST_ITEM_NORMAL_BG_1);            		
    }
    else {        
        this.SetBgImage(ITEM_STATE.NORMAL,g_Image.IMAGE_LIST_MAIN_CONTACT_LIST_ITEM_NORMAL_BG_2);
    } 
	
	this.SetBgImage(ITEM_STATE.HIGHLIGHT,g_Image.IMAGE_LIST_MAIN_CONTACT_LIST_ITEM_HIGHLIGHT_BG);	
	
	this.SetBgStyle(ITEM_STATE.NORMAL_UP, eName + "NormalUp");
	this.SetBgStyle(ITEM_STATE.NORMAL_DOWN, eName + "NormalDown");
	this.SetBgStyle(ITEM_STATE.HIGHLIGHT, eName + "Highlight");
		
	this.SetTimeStyle(ITEM_STATE.NORMAL, "cHistoryItem_Time_Normal");
	this.SetTimeStyle(ITEM_STATE.HIGHLIGHT, "cHistoryItem_Time_Highlight");
	
	this.SetBoxStyle(ITEM_STATE.NORMAL, "cItem_Box_Normal");
	this.SetBoxStyle(ITEM_STATE.HIGHLIGHT, "cItem_Box_Highlight");	
	
	this.SetAvatarStyle(ITEM_STATE.NORMAL, "cItem_Avatar_Normal");
	this.SetAvatarStyle(ITEM_STATE.HIGHLIGHT, "cItem_Avatar_Highlight");
			
	this.SetNameStyle(ITEM_STATE.NORMAL, "cHistoryItem_Name_Normal");
	this.SetNameStyle(ITEM_STATE.HIGHLIGHT, "cHistoryItem_Name_Highlight");
	
	this.NameMarqueeStyle = "cHistoryItem_Name_Highlight_Marquee";
	this.NameMarqueeCheckerDiv = "historyTextLengthChecker"
	

	this.SetOnlineStyle(ITEM_STATE.NORMAL, "cHistoryItem_Online_Normal");
	this.SetOnlineStyle(ITEM_STATE.HIGHLIGHT, "cHistoryItem_Online_Highlight");

	this.SetStatusStyle(ITEM_STATE.NORMAL, "cHistoryItem_Status_Normal");
	this.SetStatusStyle(ITEM_STATE.HIGHLIGHT, "cHistoryItem_Status_Highlight");
			
}

HistoryItem.prototype.CreateName = function(eRootName) {

    var ElementStr = eRootName + "Name";
    
    this.NameLayerIndex = this.LayerArray.length; 
    this.AddTextLayer(ElementStr);
    this.LayerArray[this.NameLayerIndex].SetReverseDisable(true);
    this.LayerArray[this.NameLayerIndex].SetIsPlainText(true); 
      
             
}

HistoryItem.prototype.CreateTime = function(eRootName) {

    var ElementStr = eRootName + "Time";

    this.TimeLayerIndex = this.LayerArray.length;    
    this.AddTextLayer(ElementStr);    
  
}

HistoryItem.prototype.CreateBox = function(eRootName) {

    var ElementStr = eRootName + "Box";

    this.BoxLayerIndex = this.LayerArray.length;    
    this.AddJPGImageLayer(ElementStr);	                
}

HistoryItem.prototype.CreateAvatar = function(eRootName) {

    var ElementStr = eRootName + "Avatar";

    this.AvatarLayerIndex = this.LayerArray.length;    
    this.AddJPGImageLayer(ElementStr);    
             
}

HistoryItem.prototype.CreateOnlineStatus = function(eRootName) {

    var ElementStr = eRootName + "Online";

    this.OnlieStatusLayerIndex = this.LayerArray.length;    
    this.AddImageLayer(ElementStr);    
             
}

HistoryItem.prototype.CreateCallStatus = function(eRootName) {

    var ElementStr = eRootName + "Status";

    this.CallStatusLayerIndex = this.LayerArray.length;    
    this.AddImageLayer(ElementStr); 
             
}

HistoryItem.prototype.CreateVMDuration = function(eRootName) {

    var ElementStr = eRootName + "Duration";
 	alert("CreateVMDuration = " + ElementStr);
    this.VMDurationLayerIndex = this.LayerArray.length;    
    this.AddTextLayer(ElementStr); 
             
}


HistoryItem.prototype.SetOnlineStyle = function(ItemStateIndex, Style){
    	
	this.OnlineStyle[ItemStateIndex] = Style;
    
}

HistoryItem.prototype.SetBoxStyle = function(ItemStateIndex, Style){
    	
	this.BoxStyle[ItemStateIndex] = Style;
    
}	

HistoryItem.prototype.SetAvatarStyle = function(ItemStateIndex, Style){
    	
	this.AvatarStyle[ItemStateIndex] = Style;
    
}

HistoryItem.prototype.SetTimeStyle = function(ItemStateIndex, Style){
    	
	this.TimeStyle[ItemStateIndex] = Style;
    
}

HistoryItem.prototype.SetNameStyle = function(ItemStateIndex, Style){
    	
	this.NameStyle[ItemStateIndex] = Style;
    
}

HistoryItem.prototype.SetStatusStyle = function(ItemStateIndex, Style){
    	
	this.StatusStyle[ItemStateIndex] = Style;
    
}

HistoryItem.prototype.GetIdentity = function(){

    return this.Identity;
}

HistoryItem.prototype.GetIdentityName = function(){

    return this.IdentityName;
}


HistoryItem.prototype.GetDisplayName = function() {
	
	return this.DisplayName;
	
}


HistoryItem.prototype.UpNormal = function() {
	alert("HistoryItem.UpNormal()");
    this.State = ITEM_STATE.NORMAL_UP;
	this.ChangeBG();
	this.ChangeLayerForNormal();
}

HistoryItem.prototype.DownNormal = function() {
	alert("HistoryItem.DownNormal()");
    this.State = ITEM_STATE.NORMAL_DOWN;
	this.ChangeBG();
	this.ChangeLayerForNormal();
}

HistoryItem.prototype.Highlight = function() {
	alert("HistoryItem.Highlight()");
	this.State = ITEM_STATE.HIGHLIGHT;
	this.ChangeBG();
	this.ChangeLayerForHighlight();
	
}

HistoryItem.prototype.ChangeLayerForHighlight = function() {
	
	alert("HistoryItem.ChangeLayerForHighlight()");

	this.LayerArray[this.BoxLayerIndex].SetStyle(this.BoxStyle[ITEM_STATE.HIGHLIGHT]);
	this.LayerArray[this.BoxLayerIndex].SetImage(g_Image.IMAGE_LIST_MAIN_CONTACT_LIST_ITEM_HIGHLIGHT_THUMBNALE_BOX);
	this.LayerArray[this.AvatarLayerIndex].SetStyle(this.AvatarStyle[ITEM_STATE.HIGHLIGHT]);		
    this.SetBigAvatar();
	this.LayerArray[this.TimeLayerIndex].SetStyle(this.TimeStyle[ITEM_STATE.HIGHLIGHT]);	
    this.LayerArray[this.OnlieStatusLayerIndex].SetStyle(this.OnlineStyle[ITEM_STATE.HIGHLIGHT]);	
//	this.SetStatusHighlight();
	this.SetStatusNormal();
    this.LayerArray[this.CallStatusLayerIndex].SetStyle(this.StatusStyle[ITEM_STATE.HIGHLIGHT]);	
    
	if(this.LayerArray[this.NameLayerIndex].CheckTextLength(this.NameMarqueeCheckerDiv, this.DisplayName) > 280)
	{
		this.LayerArray[this.NameLayerIndex].SetTextStyle(this.NameMarqueeStyle);
	}
	else{
		this.LayerArray[this.NameLayerIndex].SetTextStyle(this.NameStyle[ITEM_STATE.HIGHLIGHT]);
	}
//	this.SetCallStatusHighlight();
	this.SetCallStatusNormal();
}

HistoryItem.prototype.ChangeLayerForNormal = function() {

    alert("HistoryItem.ChangeLayerForNormal()");    

	this.LayerArray[this.BoxLayerIndex].SetStyle(this.BoxStyle[ITEM_STATE.NORMAL]);	
	this.LayerArray[this.BoxLayerIndex].SetImage(g_Image.IMAGE_LIST_MAIN_CONTACT_LIST_ITEM_NORMAL_THUMBNALE_BOX);
	this.LayerArray[this.AvatarLayerIndex].SetStyle(this.AvatarStyle[ITEM_STATE.NORMAL]);
	this.SetSmallAvatar();
	this.LayerArray[this.TimeLayerIndex].SetStyle(this.TimeStyle[ITEM_STATE.NORMAL]);		
    this.LayerArray[this.OnlieStatusLayerIndex].SetStyle(this.OnlineStyle[ITEM_STATE.NORMAL]);	
	this.SetStatusNormal();
	
	this.LayerArray[this.NameLayerIndex].SetTextStyle(this.NameStyle[ITEM_STATE.NORMAL]);	
	this.LayerArray[this.CallStatusLayerIndex].SetStyle(this.StatusStyle[ITEM_STATE.NORMAL]);
	this.SetCallStatusNormal();

}

HistoryItem.prototype.SetItem = function(HistoryDataObject) {
	
	alert("HistoryItem.SetItem()");

	var Name;
	
	if(HistoryDataObject.DisplayName) {
		Name = HistoryDataObject.DisplayName;
	}
	
	this.DisplayName	= HistoryDataObject.DisplayName;
	this.IdentityName	= HistoryDataObject.IdentityName;
	this.Identity		= HistoryDataObject.Identity;
	
	alert("IdentityName = " + this.IdentityName);
	
		
	this.LayerArray[this.NameLayerIndex].SetText(Name);
	
	var Time;
	
	if(HistoryDataObject.Time) {
		Time = HistoryDataObject.Time;
	}

	alert("Time = " + Time);
	
	this.LayerArray[this.TimeLayerIndex].SetText(Time);
	
	var Avatar;
	
	if(HistoryDataObject.AvatarPath) {		
		Avatar = HistoryDataObject.AvatarPath;
		this.AvatarType = HistoryDataObject.AvatarType;
	}
	alert("AvatarPath = " + Avatar);
	alert("AvatarType = " + this.AvatarType);
			
	this.LayerArray[this.AvatarLayerIndex].SetImage(Avatar);
	

	//BLOCKED & BLOCKED_SKYPEOUT
	if (HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.BLOCKED ||
		HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.BLOCKED_SKYPEOUT) {
			
		this.StatusImg = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_BLOCKED;
	}
	// PSTN
	else if (HistoryDataObject.AvatarType == ENUM_CONTACT_AVATA_TYPE.PSTN){
		
		this.StatusImg = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_CALLING;
	}
	//GROUP	
	else if(HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.GROUP) {
					
		this.StatusImg = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_GROUP;
	}
	//SKPYOUT
//	else if (HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.SKYPEOUT) {
			
//		Online = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_SKYPEOUT;
//	}
	//ONLINE	
	else if(HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.ONLINE || 
		HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.ONLINE_FROM_MOBILE) {
					
		this.StatusImg = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_ONLINE;
	}
	//OFFLINE
	else if (HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.OFFLINE ||
		HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.NOT_AVAILABLE_FROM_MOBILE) {
			
		this.StatusImg = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_OFFLINE;
	}
	//AWAY 
	else if (HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.AWAY ||
		HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.AWAY_FROM_MOBILE){
			
		this.StatusImg = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_AWAY;
	}
	//DO_NOT_DISTURB	
	else if (HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.DO_NOT_DISTURB ||
		HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.DO_NOT_DISTURB_FROM_MOBILE){
			
		this.StatusImg = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_DO_NOT_DISTURB;
	}
	//CALL_FORWARDING or VOICEMAIL ABLE
	else if (HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.OFFLINE_BUT_CF_ABLE ||
		HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.OFFLINE_BUT_VM_ABLE) {
			
		this.StatusImg = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_AVAILABLE;
	}
	//UNKNOWN	
	else if (HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.PENDINGAUTH ||
		HistoryDataObject.Availablity == ENUM_CONTACT_AVAILABILITY.UNKNOWN) {
			
		//IMAGE_MOIP_CONTACT_WND_UNKNOWN_STATUS			
		this.StatusImg = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_OFFLINE;

	}
	else{		
		alert("HistoryDataObject.Availablity is null");
		this.StatusImg = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_OFFLINE; 
	}	
	
	this.LayerArray[this.OnlieStatusLayerIndex].SetImage(this.StatusImg);


	var CallStatus;
	
	this.VMDuration = "";
	this.DataStatus = HistoryDataObject.Status
	switch(HistoryDataObject.Status) {
		case ENUM_HISTORY_STATUS.MISSED_INCOMING_CALL :
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CALL_MISSED_ICON;	
			break;

		case ENUM_HISTORY_STATUS.MISSED_CONFENRECE_CALL :	
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CONFENRECE_MISSED_ICON;	
			break;
		
		case ENUM_HISTORY_STATUS.INCOMING_CALL:
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CALL_IN_ICON;		
			break;

		case ENUM_HISTORY_STATUS.INCOMING_CONFERENCE:		
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CONFENRECE_IN_ICON;		
			break;
			
		case ENUM_HISTORY_STATUS.OUTGOING_CALL:			
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CALL_OUT_ICON;
			break;		
			
		case ENUM_HISTORY_STATUS.MISSED_VOICEMAIL:		
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_NEW_VOICEMAIL_ICON;
			this.VMDuration = HistoryDataObject.Duration;
			break;			
		case ENUM_HISTORY_STATUS.INCOMING_VOICEMAIL:		 		
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_VOICEMAIL_ICON;
			this.VMDuration = HistoryDataObject.Duration;
			break;		
			
		case ENUM_HISTORY_STATUS.INCOMING_MESSAGE:			
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_MESSAGE_ICON;		
			break;					
			
		default :
			alert("Default = " + HistoryDataObject.Status);
			break;
			
	}

	this.LayerArray[this.CallStatusLayerIndex].SetImage(CallStatus);
	//this.LayerArray[this.VMDurationLayerIndex].SetText(this.VMDuration);
			
	alert("VMDuration = " + this.VMDuration);
		
	this.ExistData = true;
}

HistoryItem.prototype.SetSmallAvatar = function() {
	
	
	if(this.AvatarType == ENUM_CONTACT_AVATA_TYPE.ONES_IMAGE){
		alert("AvatarType is ONES_IMAGE");
		return;
	}
	
	var Avatar;
	
	switch(this.AvatarType) {

		case ENUM_CONTACT_AVATA_TYPE.PSTN:
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_PSTN;	
			break;
		
		case ENUM_CONTACT_AVATA_TYPE.MALE:
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_MALE;	
			break;

		case ENUM_CONTACT_AVATA_TYPE.FEMALE:
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_FEMALE;	
			break;
		
		case ENUM_CONTACT_AVATA_TYPE.MYSELF:
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_MYSELF;	
			break;
			
		case ENUM_CONTACT_AVATA_TYPE.TEST_CALL:
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_TEST_CALL;	
			break;			

		case ENUM_CONTACT_AVATA_TYPE.GROUP:
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_GROUP;	
			break;

		case ENUM_CONTACT_AVATA_TYPE.NO_GENDER:			
		default :
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_NO_GENDER;	
			break;	
			
	}
	
	this.LayerArray[this.AvatarLayerIndex].SetImage(Avatar);
	
}

HistoryItem.prototype.SetBigAvatar = function() {
	
	if(this.AvatarType == ENUM_CONTACT_AVATA_TYPE.ONES_IMAGE){
		alert("AvatarType is ONES_IMAGE");
		return;
	}
	
	var Avatar;
	
	switch(this.AvatarType) {

		case ENUM_CONTACT_AVATA_TYPE.PSTN:
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_PSTN_BIG;	
			break;
		
		case ENUM_CONTACT_AVATA_TYPE.MALE:
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_MALE_BIG;	
			break;

		case ENUM_CONTACT_AVATA_TYPE.FEMALE:
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_FEMALE_BIG;	
			break;
		
		case ENUM_CONTACT_AVATA_TYPE.MYSELF:
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_MYSELF_BIG;	
			break;
			
		case ENUM_CONTACT_AVATA_TYPE.TEST_CALL:
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_TEST_CALL_BIG;	
			break;			

		case ENUM_CONTACT_AVATA_TYPE.GROUP:
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_GROUP_BIG;	
			break;

		case ENUM_CONTACT_AVATA_TYPE.NO_GENDER:		
		default :
			Avatar = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_DEFAULT_AVATA_NO_GENDER_BIG;	
			break;	
			
	}
	
	this.LayerArray[this.AvatarLayerIndex].SetImage(Avatar);
	
}

HistoryItem.prototype.SetStatusHighlight = function() {
	
	var StatusImgPath = this.StatusImg;
	
	switch(StatusImgPath) {

		case g_Image.IMAGE_ONLINE_STATUS_PRESENCE_OFFLINE:
			StatusImgPath = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_OFFLINE_HIGHLIGHT;	
			break;
		
		case g_Image.IMAGE_ONLINE_STATUS_PRESENCE_AVAILABLE:
			StatusImgPath = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_AVAILABLE_HIGHLIGHT;	
			break;

		case g_Image.IMAGE_ONLINE_STATUS_PRESENCE_SKYPEOUT:
			StatusImgPath = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_SKYPEOUT_HIGHLIGHT;	
			break;
	}

	this.LayerArray[this.OnlieStatusLayerIndex].SetImage(StatusImgPath);
	
}


HistoryItem.prototype.SetStatusNormal = function() {
	
	
	var StatusImgPath = this.StatusImg;
	
	switch(StatusImgPath) {

		case g_Image.IMAGE_ONLINE_STATUS_PRESENCE_OFFLINE_HIGHLIGHT:
			StatusImgPath = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_OFFLINE;	
			break;
		
		case g_Image.IMAGE_ONLINE_STATUS_PRESENCE_AVAILABLE_HIGHLIGHT:
			StatusImgPath = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_AVAILABLE;	
			break;

		case g_Image.IMAGE_ONLINE_STATUS_PRESENCE_SKYPEOUT_HIGHLIGHT:
			StatusImgPath = g_Image.IMAGE_ONLINE_STATUS_PRESENCE_SKYPEOUT;	
			break;
	}
	
	this.LayerArray[this.OnlieStatusLayerIndex].SetImage(StatusImgPath);
	
}

HistoryItem.prototype.SetCallStatusHighlight = function() {
	
	var CallStatus = null;
	
	switch(this.DataStatus) {
		case ENUM_HISTORY_STATUS.MISSED_INCOMING_CALL :
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CALL_MISSED_ICON_BLUE;	
			break;

		case ENUM_HISTORY_STATUS.MISSED_CONFENRECE_CALL :	
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CONFENRECE_MISSED_ICON_BLUE;	
			break;
		
		case ENUM_HISTORY_STATUS.INCOMING_CALL:
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CALL_IN_ICON_BLUE;		
			break;

		case ENUM_HISTORY_STATUS.INCOMING_CONFERENCE:		
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CONFENRECE_IN_ICON_BLUE;		
			break;
			
		case ENUM_HISTORY_STATUS.OUTGOING_CALL:			
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CALL_OUT_ICON_BLUE;
			break;		
			
		case ENUM_HISTORY_STATUS.MISSED_VOICEMAIL:		
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_NEW_VOICEMAIL_ICON_BLUE;
			break;			
		case ENUM_HISTORY_STATUS.INCOMING_VOICEMAIL:		 		
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_VOICEMAIL_ICON_BLUE;
			break;		
			
		case ENUM_HISTORY_STATUS.INCOMING_MESSAGE:			
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_MESSAGE_ICON_BLUE;		
			break;					
			
		default :
			break;
			
	}

	this.LayerArray[this.CallStatusLayerIndex].SetImage(CallStatus);
	
}


HistoryItem.prototype.SetCallStatusNormal = function() {
	
	
	switch(this.DataStatus) {
		case ENUM_HISTORY_STATUS.MISSED_INCOMING_CALL :
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CALL_MISSED_ICON;	
			break;

		case ENUM_HISTORY_STATUS.MISSED_CONFENRECE_CALL :	
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CONFENRECE_MISSED_ICON;	
			break;
		
		case ENUM_HISTORY_STATUS.INCOMING_CALL:
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CALL_IN_ICON;		
			break;

		case ENUM_HISTORY_STATUS.INCOMING_CONFERENCE:		
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CONFENRECE_IN_ICON;		
			break;
			
		case ENUM_HISTORY_STATUS.OUTGOING_CALL:			
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_CALL_OUT_ICON;
			break;		
			
		case ENUM_HISTORY_STATUS.MISSED_VOICEMAIL:		
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_NEW_VOICEMAIL_ICON;
			break;			
		case ENUM_HISTORY_STATUS.INCOMING_VOICEMAIL:		 		
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_VOICEMAIL_ICON;
			break;		
			
		case ENUM_HISTORY_STATUS.INCOMING_MESSAGE:			
			CallStatus = g_Image.IMAGE_LIST_MAIN_HISTORY_LIST_ITEM_MESSAGE_ICON;		
			break;					
			
		default :
			break;
			
	}

	this.LayerArray[this.CallStatusLayerIndex].SetImage(CallStatus);
	
}
