# Routines to simplifiy HTML generation

proc Html_Insert {win html} {
    HMparse_html $html [list HMrender $win] {}
}

proc Html_Link { url {text {}}} {
    if {[string length $text] == 0} {
	set text $url
    }
    return "<a href=\"$url\">$text</a>"
}
proc Html_Head { title } {
    return "<html><head><title>$title</title></head>"
}
proc H1 {string} {
    return <h1>$string</h1>
}
proc H2 {string} {
    return <h2>$string</h2>
}
proc H3 {string} {
    return <h3>$string</h3>
}
proc H4 {string} {
    return <h4>$string</h4>
}
proc H5 {string} {
    return <h5>$string</h5>
}
proc H6 {string} {
    return <h6>$string</h6>
}
proc Bold {string} {
    return <strong>$string</strong>
}
proc Italic {string} {
    return <em>$string</em>
}
proc Html_Color {color string} {
    return "<color value=$color>$string</color>"
}
