Sub WriteHtmlAllFootnotes(oSources)
Dim collSources
Set collSources = Util.
NewGenoCollection()
If Not
Util.IsNothing(OSources) Then collSources.Add(oSources.ToGenoCollection)
If (g_collFootnotes.Count > 0) Or (collSources.Count > 0) Then
Report.WriteBr "<div class='clearleft'><ul class='xT'>"
Report.WriteFormattedLn " <li class='xT2-{} xT-h' onclick='xTclk(event,""2"")'>",
Util.IfElse(g_fCollapseReferences, "c", "o")
Report.WriteFormattedLn "<a name='Sources & Citations'></a><h3 class='xT-i inline'>{&t}</h3><ul class='xT-h'><li>", Dic("SourceCitations")
Report.WriteLn "<div class='footnote clearleft'>"
If (g_collFootnotes.Count > 0) Then
Dim iFootnote, oFootnote, strTitle, strSep, s
iFootnote = 0
For Each oFootnote In g_collFootnotes
iFootnote = iFootnote + 1
strTitle = StrPlainText(oFootnote,
Util.FirstNonEmpty(oFootnote.Subtitle, oFootnote.Description, oFootnote.QuotedText, Dic("SourceInformation")))
If (strTitle <> "") Then
strTitle =
Util.FormatString(" title='{}'", strTitle)
End If
Report.WriteFormattedBr "<sup><a name='{0}'></a>{0} </sup> <a href='source-{&t}.htm' onclick='showPopUpFrame("""");' target='popup' {}><i>{}</i></a>", iFootnote, oFootnote.ID, strTitle, JoinSourceCitationNames(oFootnote, StrFormatText(oFootnote, StrParseText(oFootnote.title, True)), true)
' remove referenced source from list
collSources.Remove(oFootnote)
Next
g_collFootnotes.clear
End If
If collSources.Count > 0 Then ' write details of remaining source/citations
strSep = ""
For Each oFootnote in collSources
strTitle = StrPlainText(oFootnote, Util.FirstNonEmpty(oFootnote.Subtitle, oFootnote.Description, oFootnote.QuotedText, Dic("SourceInformation")))
If (strTitle <> "") Then
strTitle = Util.FormatString(" title='{}'", strTitle)
End If
Report.WriteFormattedbr "<a href='source-{&t}.htm' onclick='showPopUpFrame("""");' target='popup' {}><i>{}</i></a>", oFootnote.ID, strTitle, JoinSourceCitationNames(oFootnote, StrFormatText(oFootnote, StrParseText(oFootnote.title, True)), true)
Next
End If
Report.WriteLn "</div>"
End If
End Sub