<%[@ IncludeFile "Code/Util.vbs" ]%> <%[@ IncludeFile "Code/Lang.vbs" ]%> <%[ InitGlobalVariables ' The following code generates list of families in the report. ' The sorting of families is done using the father's last name ' as the primary sort key, then the first and middle name. ' If a husband had multiple partners (therefore multiple ' families), then the sorting is done according to the ' spouse's last name, first and middle name. ' If the husband's name is unknown then the wife's name is used ' This is not the ideal method of grouping families, ' however it is better than nothing. Set oNameDicNames = Session("oNameDicNames") Set oDataSorter = Util.NewDataSorter() ' Add each valid family to the DataSorter For Each f In Families If (f.Name <> "" And Not f.IsLabel) Then Set oParent = f.Parents(0) If oParent.Name.Last = "" Then Set oParent = f.Parents(1) Set oSpouse = f.Parents(0) Else Set oSpouse = f.Parents(1) End if oDataSorter.Add f, oParent.Session("NameLast"), StrNameTranslate(oParent.Name.First, oNameDicNames, False), StrNameTranslate(oParent.Name.Middle, oNameDicNames, False), oSpouse.Session("NameLast") Else ' Prevent any hyperlink to a family without a name f.Href = "" End If Next ' Sort the families according the sort keys oDataSorter.SortByKey ' Now, get a normal collection of families from the DataSorter. Set collFamiliesSorted = oDataSorter.ToGenoCollection ' Store this collection in the Session object, so it can be accessed when generating the picture album too Session("collFamiliesSorted") = collFamiliesSorted If g_cTocExpand = -1 Or g_cTocExpand >= collFamiliesSorted.Count Then fTreeOpen = true strToggle="collapse" Else fTreeOpen = false strToggle = "expand" End If fPrivateFolder = Eval(Left(Report.FileOutput,g_nPrivateFolder)=g_strPrivateFolder) ]%> @[ Report.WriteFormatted Dic("FmtTitleTocFamilies"), Session("Title") ]@ <%[If fPrivateFolder Then Report.WriteFormattedLn "",g_strBaseUrl Else Report.WriteLn "" End If]%> <%[If g_fUseTreeIndexes Then]%> @[WriteHtmlButtonToggle("Entries")]@

@[ Report.WriteTextDic "TocIndexFamilies" ]@

<%[WriteHtmlLinkToPrivateToc fPrivateFolder, "families"]%>
<%[End If]%>

<%[ WriteHtmlFramesetSafeguardK iFamilyLast, "GenoProReportFamilies", nothing ]%>