proc mkMsg msg {

#$Header: /home/cvsroot/tcldb/ucodb/Tlib/mkMsg,v 1.3 1999/03/27 02:19:38 de Exp $

        global MsgBox MsgColours MsgColInd CurrMsg
	global Owner

	if {[info exists Owner]} {
		send $Owner mkMsg \"$msg\"
		return
	}

	if {![info exists MsgBox]} {
		puts stderr "MSG $msg"
		return
	}

        set mm [eval max [array names MsgColours]]

        incr MsgColInd

        if {$MsgColInd > $mm} {
                set MsgColInd 0
        }

        $MsgBox configure -state normal
        set CurrMsg "$msg"
#       $MsgBox delete 0 end
#       $MsgBox insert 0 "$msg"
        $MsgBox configure -state disabled -background $MsgColours($MsgColInd)

}

