%[@ IncludeFile "Code/Util.vbs" ]%>
<%[@ IncludeFile "Code/Lang.vbs" ]%>
<%[
InitGlobalVariables
If g_cTocExpand = -1 Or g_cTocExpand >= GenoMaps.Count Then
fTreeOpen = true
strToggle="collapse"
Else
fTreeOpen = false
strToggle = "expand"
End If
fPrivateFolder = Eval(Left(Report.FileOutput,g_nPrivateFolder) = g_strPrivateFolder)
]%>
<%[
Dim strFirstChar, strFirstCharPrev, g, fLinkToGenoMap
ReportGenerator.NegateAxisY = True
If g_fUseTreeIndexes Then
Report.WriteLn "
"
GenoMaps.Sortby("Name")
For Each g in GenoMaps
If fPrivateFolder Or Not isPrivateGenoMap(g) Then
strFirstChar = Util.StrStripAccentsUCase(Util.StrStripPunctuation(Util.StrGetFirstChar(g.Name)))
If strFirstChar <> strFirstCharPrev Then
If strFirstCharPrev <> "" Then Report.WriteLn "
"
Report.WriteFormattedLn "
{&t}", Util.IfElse(fTreeOpen,"o","c"), strFirstChar
strFirstCharPrev = strFirstChar
End If
WriteHtmlGenoMap(g)
End If
Next
If strFirstCharPrev <> "" Then Report.WriteLn "
"
Report.WriteLn ""
Else
For Each g In GenoMaps
If fPrivateFolder Or Not isPrivateGenoMap(g) Then WriteHtmlGenoMap(g)
Next
End If
If (fLinkToGenoMap) Then
Session("toc_genomaps") = true
End If
Sub WriteHtmlGenoMap(g)
strPathGenoMap = g.Session("PathGenoMap")
If (strPathGenoMap <> "") Then
If fPrivateFolder Then strPathGenoMap = g_strPrivateFolder & strPathGenoMap
Set box=g.BoundaryRect
If (Not Util.IsNothing(box)) Then
cx=box.Left + (box.Right-box.Left) / 2
cy=box.Top + (box.Bottom - box.Top) / 2
Report.WriteFormattedBr "
{&t}", Dic("AltSVGImage"), strPathGenoMap , cx, cy, g.Name
fLinkToGenoMap = true
End If
End If
End Sub
]%>