proc mkAlert {tt at bt ju nam {font {}}} {

#	global datahelping

    if {$nam == ""} {
    set w .alertbox
    } else {
    set w .nam
    }
    catch {destroy $w}
    toplevel $w -class Dialog
    wm title $w "$tt"
    wm geometry $w "+150+150"
    wm iconname $w "ReadMe"

    frame $w.top -relief raised -border 1 -background antiquewhite
    frame $w.bot -relief raised -border 1 -background antiquewhite
    pack $w.top -side top -fill both -expand true 
    pack $w.bot -side top -fill both -expand true

    case $ju in {
	{l} {
		set just left
	}
	{r} {
		set just right
	}
	{v} {
		set just verbatim
	}
	{default} {
		set just center
	}
    }

    if {$font == ""} {
    set font [getFont $w mediumhel]
    }
    if {$just == "verbatim"} {
    set l [expr [llength [split $at \n]] + 1]
    text $w.top.msg -width 60 -height $l -background ivory
    $w.top.msg insert 1.0 $at
    $w.top.msg configure -state disabled
    } else {
    eval message $w.top.msg -justify $just -font $font -text $at -background ivory
    }
    pack $w.top.msg -side top -expand true -fill both -ipadx 5


    button $w.bot.dismiss -text $bt -command "destroy $w" -padx 0 -pady 0  -background lavender -activebackground lavender -activeforeground magenta2

#	If called from wisql with ctrl-mouse-3, then ...

    if {$nam == "showsql"} {
	eval button $w.bot.tran -text "TRANSFER" -command \{.m.s.sql delete 1.0 end\; .m.s.sql insert 0.1 $at \}
	pack $w.bot.tran -side left -ipadx 10 
 	pack $w.bot.dismiss -side right -ipadx 15
    } else {
    pack $w.bot.dismiss -expand true -ipadx 20
    }

    bind $w <Return> "destroy $w"
    focus $w

}

