<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:import href="report_common.xslt"/>
	<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>

	<xsl:template match="/">

		<!--||Virus/Malware Graph||-->
		<tr><td class="tableheadergreyM">Virus/Malware Graph</td></tr>
		<tr><td class="border2" align="center">
			<img alt="virus graph"><xsl:attribute name="src">images/<xsl:value-of select="/report/dataset/data[starts-with(@name,'report_item_virus_graph')]/@name"/>.png</xsl:attribute></img></td></tr>
		<tr><td class="border2"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></td></tr>
        
    	<!--||Spyware/Grayware Graph||-->
		<tr><td class="tableheadergreyM">Spyware/Grayware Graph</td></tr>
		<tr><td class="border2" align="center">
			<img alt="Spyware/Grayware graph"><xsl:attribute name="src">images/<xsl:value-of select="/report/dataset/data[starts-with(@name,'report_item_spyware_graph')]/@name"/>.png</xsl:attribute></img></td></tr>
		<tr><td class="border2"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></td></tr>
            
		<!--||Top Virus/Malware||-->
		<xsl:variable name="virus_top_data" select="/report//dataset/data[@name='report_item_virus_top_viruses']"/>
		<tr><td class="tableheader">Top Virus/Malware</td></tr>
		<tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr><td class="grey" height="20"  width="30%">Virus/Malware Name</td>
					<td class="grey-end" align="right" >Total</td></tr>
			<xsl:for-each select="$virus_top_data//datarow">
				<xsl:variable name="toggleBgColor">
					<xsl:if test="position() mod 2 = 1">data1</xsl:if>
					<xsl:if test="position() mod 2 = 0">data2</xsl:if>
				</xsl:variable>
				<tr><td class="data1b" height="20"  ><xsl:value-of select="@virus_name"/></td>
					<td class="data1" align="right" ><xsl:value-of select="@virus_count"/></td></tr>
			</xsl:for-each>
				</table></td></tr>
		<tr><td class="border2"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></td></tr>

    	<!--||Top Spyware/Grayware||-->
		<xsl:variable name="spyware_top_data" select="/report//dataset/data[@name='report_item_spyware_top_spywares']"/>
		<tr><td class="tableheader">Top Spyware/Grayware</td></tr>
		<tr><td><table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr><td class="grey" height="20"  width="30%">Spyware/Grayware Name</td>
					<td class="grey-end" align="right" >Total</td></tr>
			<xsl:for-each select="$spyware_top_data//datarow">
				<xsl:variable name="toggleBgColor">
					<xsl:if test="position() mod 2 = 1">data1</xsl:if>
					<xsl:if test="position() mod 2 = 0">data2</xsl:if>
				</xsl:variable>
				<tr><td class="data1b" height="20"  ><xsl:value-of select="@spyware_name"/></td>
					<td class="data1" align="right" ><xsl:value-of select="@spyware_count"/></td></tr>
			</xsl:for-each>
				</table></td></tr>
		<tr><td class="border2"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></td></tr>
        
	</xsl:template>
</xsl:stylesheet>
