function TimePropUDF (flxType,TextFont,SelectString,mTime,k,h1) 
% TimePropUDF
% based on user defined properties of text properties, changes
% time-series text properties on map images.
%
% O. Jamialahmadi
% TMU, Chem. Eng. Dept., Biotech. Group 
% Apr. 2015

if isempty(TextFont) % Set default properties
    TextFont.FontName = 'Arial';
    TextFont.FontWeight = 'normal';
    TextFont.FontAngle = 'normal';
    TextFont.FontUnits = 'points';
    TextFont.FontSize = 10;
end

switch flxType
    case 'One'
        if strcmp(SelectString,'NShow')
        elseif strcmp(SelectString,'NO')
            text(10,10,['Time point: ',num2str(mTime(k))]...
                ,'FontSize',TextFont.FontSize,'FontName',...
                TextFont.FontName,'FontWeight',...
                TextFont.FontWeight,'FontAngle',...
                TextFont.FontAngle,'FontUnits',...
                TextFont.FontUnits,'Parent',h1)
        else
            text(10,10,['Time point: ',num2str(mTime(k)),...
                ' ',SelectString],'FontSize',TextFont.FontSize,...
                'FontName',TextFont.FontName,'FontWeight',...
                TextFont.FontWeight,'FontAngle',TextFont.FontAngle,...
                'FontUnits',TextFont.FontUnits,'Parent',h1)
        end
    case 'Two'
        if strcmp(SelectString,'NShow')
        elseif strcmp(SelectString,'NO')
            text(10,10,['Time point: ',num2str(mTime(ceil(k/2)))]...
                ,'FontSize',TextFont.FontSize,'FontName',...
                TextFont.FontName,'FontWeight',TextFont.FontWeight,...
                'FontAngle',TextFont.FontAngle,'FontUnits',...
                TextFont.FontUnits,'Parent',h1)
        else
            text(10,10,['Time point: ',num2str(mTime(ceil(k/2))),...
                ' ',SelectString],'FontSize',TextFont.FontSize,...
                'FontName',TextFont.FontName,'FontWeight',...
                TextFont.FontWeight,'FontAngle',...
                TextFont.FontAngle,'FontUnits',...
                TextFont.FontUnits,'Parent',h1)
        end
end

