Option Compare Database   'Use database order for string comparisons
Option Explicit


Sub EmitHTMLHeader (FileNum As Integer, FileName As String, TopicTitle As String)

  ' Generate HTML file header using the specified filename and
  ' file or "channel" number.

  Open FileName For Output As #FileNum Len = 4096

  ' First emit HTML identifiers, text for window title bar,
  ' and heading for the client area
  Print #FileNum, "<HTML>"
  Print #FileNum, "<HEAD>"
  Print #FileNum, "<TITLE>" & TopicTitle & "</TITLE>"
  Print #FileNum, "</HEAD>"
  Print #FileNum, "<BODY>"
  Print #FileNum, "<H1>" & TopicTitle & "</H1>"

  ' Generate a horizontal rule to separate the client-area
  ' heading from the subsidiary information
  Print #FileNum, "<HR>"

End Sub


Sub EmitHTMLHotLink (FileNum As Integer, HotLinkString As String, TargetString As String)

  ' Routine to emit an HTML hotlink to the specified file.
  ' Does not force a new line!!  The TargetString must contain
  ' a valid absolute or relative URL. The HotLinkString is the
  ' text that is seen in color or underlined by the user.

  Print #FileNum, "<A HREF=" & TargetString & ">" & HotLinkString & "</A>";

End Sub


Sub EmitHTMLTrailer (FileNum As Integer)

  ' Routine to generate the Web page footnote and the HTML file
  ' trailer and then close the file.

  Print #FileNum, "<HR>"
  Print #FileNum, "<ADDRESS>"
  Print #FileNum, "Created " & Date$ & " / Last Modified " & Date$ & "<BR>"
  Print #FileNum, "Ahmanson Pediatric Center / Cedars-Sinai Medical Center / duncan@csmc.edu"
  Print #FileNum, "</ADDRESS>"
  Print #FileNum, "</BODY>"
  Print #FileNum, "</HTML>"
  Close #FileNum

End Sub

