
function PictureItem () {
	
		
    ListItem.call(this);
}

PictureItem.prototype = new ListItem(); 


PictureItem.prototype.Create = function(eName) {
    
    alert("PictureItem.Create()");
	
    this.CreateBG(eName);    
    this.CreateAvatar(eName);
  /// need to modify   
	this.SetBgImage(ITEM_STATE.NORMAL,null);
	this.SetBgImage(ITEM_STATE.HIGHLIGHT,g_Image.IMAGE_CHANGE_PICTURE_THUMB_HIGHLIGHT);
			
	this.SetBgStyle(ITEM_STATE.NORMAL, eName + "Normal");
	this.SetBgStyle(ITEM_STATE.HIGHLIGHT, eName + "Highlight");
		
	this.SetAvatarStyle(ITEM_STATE.NORMAL, "cPictureItem_Image_Normal");
	this.SetAvatarStyle(ITEM_STATE.HIGHLIGHT, "cPictureItem_Image_Highlight");
			

}


PictureItem.prototype.CreateAvatar = function(eRootName) {
	
    var ElementStr = eRootName + "Image";
	alert("PictureItem.CreateAvatar(" + ElementStr + ")");
	
    this.ImageLayerIndex = this.LayerArray.length;    
    this.AddJPGImageLayer(ElementStr);    
             
}

PictureItem.prototype.SetAvatarStyle = function(ItemStateIndex, Style){
    	
	this.ImageStyle[ItemStateIndex] = Style;
	
	if(ItemStateIndex == ITEM_STATE.NORMAL) {	
		this.LayerArray[this.ImageLayerIndex].SetStyle(Style);	
	}
    
}


PictureItem.prototype.Normal = function() {
	
    this.State = ITEM_STATE.NORMAL;
	this.ChangeBG();
	this.LayerArray[this.ImageLayerIndex].SetStyle(this.ImageStyle[ITEM_STATE.NORMAL]);
}

PictureItem.prototype.Highlight = function() {
	
	this.State = ITEM_STATE.HIGHLIGHT;
	this.ChangeBG();
	this.LayerArray[this.ImageLayerIndex].SetStyle(this.ImageStyle[ITEM_STATE.HIGHLIGHT]);
	
}
