function Number(str){
	return str*1;
}
OnCommand=function(cmdObj){
	var cmd=cmdObj.cmd.toLowerCase();
	if(cmd=="list_miniplay"){
		if(cmdObj.itemId.toLowerCase()=="length"&&cmdObj.type=="NOTIFY_CHILD"){
			var childCmdObj=cmdObj.data;
			var childCmd=childCmdObj.cmd.toLowerCase();
			if(childCmd=="btn_custom"){
				SendMenuMsg("M_RING",Number(cmdObj.rowIndex)+1);
			}
			else if(childCmd=="btn_addto"){
				SendMenuMsg("M_ADDTO",Number(cmdObj.rowIndex)+1);
			}
		}
	}
}
function RefreshListItemInfo_length(index,item,newState,oldState){
	var bShow=false;
	if(index>=0){
		var strs=newState.split(",");
		var state=strs[0].toLowerCase();
		if(state=="in"||state=="insel"){
			bShow=true;
			if(strs.length>1&&strs[1].toLowerCase()=="error"){
				bShow=false;
			}
		}
	}
	item.btn_addto.ShowCtrl(bShow);
	item.btn_custom.ShowCtrl(bShow);
}
list_miniplay.OnItemInfoChanged_length=RefreshListItemInfo_length;