<%[@ IncludeFile "Code/Util.vbs" ]%> <%[@ IncludeFile "Code/Lang.vbs" ]%> <%[If Session("Book") Then Report.AbortTemplate]%> <%[ If Not Session("Svg") Then Report.AbortPage ReportGenerator.NegateAxisY = True ' Create an HTML file for each GenoMap Dim strAltShowGenoMapFrame, strAltHideGenoMapFrame, strMapInfo, strMapInfo1, oFso, oSvg, maxPopups strAltHideGenoMapFrame = StrDicExt("AltHideGenoMapFrame", "AltHideSvgFrame", "", "", "2.0.1.6") strAltToggleGenoMapFrame = StrDicExt("AltToggleGenoMapFrame", "AltToggleSvgFrame", "", "", "2.0.1.6") strMapInfo1 = Util.FormatString("ZoomExtent:{},ExpandFrame:{}", _ Util.IfElse(Session("fSvgZoomExtent"), "true", "false"), _ Util.IfElse(Session("fSvgExpandFrame"), "true", "false")) Set oFso = CreateObject("Scripting.FileSystemObject") For Each g In GenoMaps strFile = Util.JavaScriptEncode(g.Session("FileSvg")) If (strFile <> "") Then strMapInfo = "{File:""" & strFile & """, Bounds:[" & g.BoundaryRect & "]," &strMapInfo1 & "}" ]%> @[GoogleAnalytics]@
@[Report.WriteText strAltToggleGenoMapFrame]@ @[Report.WriteText strAltHideGenoMapFrame]@

@[Report.WriteText Util.IfElse(GenoMaps.Count > 1, StrDicExt("HeaderGenoMap", "HeaderSvg", "", "", "2.0.1.6"), StrDicExt("HeaderGenoMap", "HeaderSvg", "1", "PC", "2.0.1.6")) & g.Name]@

<%[ Report.LogComment g.Name & "/" & VarType(g.Session("svg")) & "/" & g.Session("svg") If VarType(g.Session("svg")) = 8 And g.Session("svg") <> "" Then Report.LogComment g.Session("svg") & " exists? " & oFso.FileExists(g.Session("svg")) Else Report.LogComment "Session value 'svg' missing for " & g.Name End If Set oSvg = oFso.OpenTextFile(g.Session("svg"), 1, False, -1) Report.Write oSvg.ReadAll oSvg.Close oFso.DeleteFile g.Session("svg") ]%>
<%[ Report.BufferWriteToFile g.Session("PathGenoMap") ' Write the content of the buffer to a file Report.BufferLength = 0 ' Flush the buffer for the next HTML page End If Next ' Generate the next HTML page Report.AbortPage ' Prevent the template file "genomap.htm" to be written to the output report ]%>